0

I found chromium issue titled "Allow extensions/apps to sync their own settings" that has status 'Fixed'. It's from December 2011. So, does it work? If so, how does it work and where are the docs?

Last time similar question was asked in 2010 and then the answer was to use bookmarks hack. I think it's time to have an update on this topic.

Update: I just found these docs for experimental chrome.storage API. Is this what I'm looking for? Do we have any new alternatives (other than bookmarks) till chrome.storage goes stable?

Community
  • 1
  • 1
Konrad Dzwinel
  • 36,825
  • 12
  • 98
  • 105

1 Answers1

2
  • chrome.experimental.storage was introduced as an experimental API in Chrome 18.
  • In Chrome 19, the API became restricted to the Dev channel.
  • Since Chrome 20, the API is not experimental any more Docs | Examples.

To use the API, manifest version 2 is required. This is the minimum manifest file to get an extension to work in Chrome 20+:

{
  "name": "test",
  "version": "1",
  "manifest_version": 2,
  "permissions": ["storage"]
}
Rob W
  • 341,306
  • 83
  • 791
  • 678
  • Thanks for your answer! There is nothing in http://code.google.com/chrome/extensions/whats_new.html about storage API :( How did you know about it? BTW, manifest version 1 works fine in Chrome 20 - check out this: http://code.google.com/chrome/extensions/manifestVersion.html . – Konrad Dzwinel Jul 11 '12 at 09:08
  • @KonradDzwinel Most of the content in my answer is not documented (yet). I've obtained the results by testing it. When an extension attempts to request the `"storage"` permission without manifest v2, this warning will be shown: http://i.stack.imgur.com/JIbbk.png ("'storage requires manifest version of at least 2"). – Rob W Jul 11 '12 at 09:12
  • Sorry, I misunderstood you. I thought you are saying that manifest version 2 is required for extensions running in Chrome 20. And what you were actually saying is that manifest version 2 is required for storage API. Sorry for the confusion and thanks for help :) – Konrad Dzwinel Jul 11 '12 at 09:20