Reputation: 885
I'm using the chrome.storage.sync
API as part of a Google Chrome extension that I'm building.
I sometimes need to get all the synced data and I do that by using:
chrome.storage.sync.get(null, function(items) { //do stuff with the results } );
I've just been testing this out by logging into Gmail with different accounts and it appears that the data is shared between them (I was online the whole time). What's going on? I thought that using chrome.storage.sync
would sync data to each user's Google account?
In the API it says:
When using storage.sync, the stored data will automatically be synced to any Chrome browser that the user is logged into, provided the user has sync enabled.
What exactly does 'logged into' mean in this context? Does it mean signed into (via a Google account) or just opened?
Upvotes: 0
Views: 1181
Reputation: 31
Google chrome just will save the data in the user that you are using in that moment even if you have more users logged.
Upvotes: -1
Reputation: 2785
If you go to chrome://settings you will see a Sign in section (probably at the very top). This is the account that will be used for chrome app synchronization.
Upvotes: 4