Implement an initial extension settings API.

Some general notes:
 - It's a lot of code for a single review, about 1.5K lines (plus tests, plus those generated docs, = 3.5K).  Apologies.  But it's close to the minimal amount of useful functionality.  I've left some TODOs in the code to fix up soon.
 - No integration-style tests, but I'll start writing those now.  Works from within a browser though.
 - Sync not hooked up yet, of course.
 - Ditto events.
 - Ditto thinking about incognito mode.
 - Ditto fun bugs like what happens if you set key "foo.bar" to "baz".
 - This is the first significant amount of C++ code I've ever written... so don't hold back.
 - The docs (i.e. my changes to extension_api.json) are a little incomplete, and I'm aware of that.

A summary of the implementation:
 - There is an ExtensionSettings factory-type object which hands out ExtensionSettingsStorage areas for extensions.  You may notice that I basically did the same thing that ExtensionPreferences does (so, lives with the profile, etc).
 - ExtensionSettingsStorage is a pure interface, with three implementations.
   - the main leveldb implementation.
   - a caching decorator, designed to sit on top of the leveldb implementation.
   - a "no-op" implementation which gives a trivial in-memory storage area when wrapped with a cache.  This is used in the cases where the leveldb database fails to initialise (ExtensionSettings handles this).
   -  and note that my plan is, when hooking up sync, that this will be implemented as another decorator.
 - ... the code is pretty well documented so not much else to say.

For testing, turns out gtest is pretty snazzy.  There are a bunch of test fixtrues in extension_settings_storage_unittest.h, so that 3 different configurations are tested: leveldb, leveldb + cache, and no-op + cache.

BUG=47327
TEST=unit tests provided


Review URL: http://codereview.chromium.org/7189029

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@96159 0039d316-1c4b-4281-b951-d872f2087c98
35 files changed