As the title says, it might be better to use chrome.storage.local rather than localStorage. There's two reasons for this: chrome.storage is asynchronous, which supposedly makes it faster. But more importantly, localStorage is limited to either 2.5MB or 5MB of data. But if you use chrome.storage, you can use the "unlimitedStorage" permission.
Speaking from experience writing Chrome Extensions, chrome.storage.local is the best way I've found to persistently store user data. And if you're worried about it being async, it's easy to write a buffer so that the API remains synchronous, but behind the scenes it's still async. I can give more details if you like, including working code.
Customer support service by UserEcho