Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(97)

Issue 8497065: Extension Settings API: make it so that when leveldb storage areas fail to be (Closed)

Created:
9 years, 1 month ago by not at google - send to devlin
Modified:
9 years, 1 month ago
Reviewers:
Matt Perry
CC:
chromium-reviews, Aaron Boodman, Erik does not do reviews, mihaip+watch_chromium.org, Paweł Hajdan Jr.
Visibility:
Public.

Description

Extension Settings API: make it so that when leveldb storage areas fail to be opened/created, all operations fail from then on rather than falling back to an in-memory implementation. Slight refactor to SettingsFrontend/Backend to inject a factory for creating SettingsStorage objects, for testing when storage area construction fails. BUG=103514 TEST=*ExtensionSettings* Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=109579

Patch Set 1 #

Total comments: 1

Patch Set 2 : . #

Patch Set 3 : . #

Total comments: 4

Patch Set 4 : . #

Unified diffs Side-by-side diffs Delta from patch set Stats (+359 lines, -92 lines) Patch
M chrome/browser/extensions/extension_service.h View 3 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/extensions/extension_service.cc View 3 chunks +3 lines, -2 lines 0 comments Download
A chrome/browser/extensions/settings/failing_settings_storage.h View 1 chunk +35 lines, -0 lines 0 comments Download
A chrome/browser/extensions/settings/failing_settings_storage.cc View 1 chunk +61 lines, -0 lines 0 comments Download
M chrome/browser/extensions/settings/in_memory_settings_storage_unittest.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/extensions/settings/settings_api.cc View 2 chunks +4 lines, -5 lines 0 comments Download
M chrome/browser/extensions/settings/settings_apitest.cc View 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/extensions/settings/settings_backend.h View 3 chunks +7 lines, -0 lines 0 comments Download
M chrome/browser/extensions/settings/settings_backend.cc View 1 2 3 4 chunks +22 lines, -31 lines 0 comments Download
M chrome/browser/extensions/settings/settings_frontend.h View 3 chunks +16 lines, -1 line 0 comments Download
M chrome/browser/extensions/settings/settings_frontend.cc View 1 7 chunks +38 lines, -6 lines 0 comments Download
M chrome/browser/extensions/settings/settings_frontend_unittest.cc View 1 2 7 chunks +87 lines, -7 lines 0 comments Download
M chrome/browser/extensions/settings/settings_leveldb_storage.h View 1 chunk +16 lines, -6 lines 0 comments Download
M chrome/browser/extensions/settings/settings_leveldb_storage.cc View 2 chunks +6 lines, -4 lines 0 comments Download
M chrome/browser/extensions/settings/settings_leveldb_storage_unittest.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/extensions/settings/settings_storage_cache_unittest.cc View 1 chunk +1 line, -1 line 0 comments Download
A chrome/browser/extensions/settings/settings_storage_factory.h View 1 chunk +28 lines, -0 lines 0 comments Download
M chrome/browser/extensions/settings/settings_storage_unittest.h View 1 chunk +3 lines, -3 lines 0 comments Download
M chrome/browser/extensions/settings/settings_storage_unittest.cc View 12 chunks +16 lines, -16 lines 0 comments Download
M chrome/browser/extensions/settings/settings_sync_unittest.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/extensions/settings/settings_test_util.h View 1 2 1 chunk +4 lines, -2 lines 0 comments Download
M chrome/browser/extensions/settings/settings_test_util.cc View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/chrome_browser.gypi View 1 2 3 2 chunks +3 lines, -0 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
not at google - send to devlin
(Also: re-add "Extensions" back to a bunch of tests that it got accidentally removed from ...
9 years, 1 month ago (2011-11-10 06:59:33 UTC) #1
Matt Perry
lgtm http://codereview.chromium.org/8497065/diff/6001/chrome/browser/extensions/settings/settings_backend.cc File chrome/browser/extensions/settings/settings_backend.cc (right): http://codereview.chromium.org/8497065/diff/6001/chrome/browser/extensions/settings/settings_backend.cc#newcode77 chrome/browser/extensions/settings/settings_backend.cc:77: // It's fine to create the quota enforcer ...
9 years, 1 month ago (2011-11-11 00:49:38 UTC) #2
not at google - send to devlin
9 years, 1 month ago (2011-11-12 02:10:27 UTC) #3
Oops forgot to send out the comments for this.

(Already submitted, sending out for the record...)

http://codereview.chromium.org/8497065/diff/6001/chrome/browser/extensions/se...
File chrome/browser/extensions/settings/settings_backend.cc (right):

http://codereview.chromium.org/8497065/diff/6001/chrome/browser/extensions/se...
chrome/browser/extensions/settings/settings_backend.cc:77: // It's fine to
create the quota enforcer underneath the sync later, since
On 2011/11/11 00:49:38, Matt Perry wrote:
> later = layer?

Done.

http://codereview.chromium.org/8497065/diff/6001/chrome/browser/extensions/se...
File chrome/browser/extensions/settings/settings_backend.h (right):

http://codereview.chromium.org/8497065/diff/6001/chrome/browser/extensions/se...
chrome/browser/extensions/settings/settings_backend.h:76:
SettingsStorageFactory* const storage_factory_;
On 2011/11/11 00:49:38, Matt Perry wrote:
> Is there a reason this is const? This will just prevent you from pointing
> storage_factory_ at a different object. Did you mean "const
> SettingsStorageFactory*" (which will prevent you from modifying the data of
the
> object being pointed to)?

Yep that was deliberate.  It could be "const SettingsStoargeFactory* const
storage_factory_" but "const SettingsStorageFactory" isn't really that
interesting, it would mean I'd need to add const to the ::Create methods, which
is just boring.

I... like to add const to pointers in the same way that I like putting final to
members in Java... just documentation that this won't change.

Powered by Google App Engine
This is Rietveld 408576698