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

Unified Diff: chrome/browser/extensions/settings/settings_backend.h

Issue 8497065: Extension Settings API: make it so that when leveldb storage areas fail to be (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 9 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/extensions/settings/settings_backend.h
diff --git a/chrome/browser/extensions/settings/settings_backend.h b/chrome/browser/extensions/settings/settings_backend.h
index 58f1d0200518500bf5a4172bcb291838e8ea789b..1c6366fc5c2ce234aa9355e5a9cf9317f7eed7c9 100644
--- a/chrome/browser/extensions/settings/settings_backend.h
+++ b/chrome/browser/extensions/settings/settings_backend.h
@@ -12,6 +12,7 @@
#include "base/memory/ref_counted.h"
#include "base/observer_list_threadsafe.h"
#include "base/task.h"
+#include "chrome/browser/extensions/settings/settings_leveldb_storage.h"
#include "chrome/browser/extensions/settings/settings_observer.h"
#include "chrome/browser/extensions/settings/syncable_settings_storage.h"
#include "chrome/browser/sync/api/syncable_service.h"
@@ -23,10 +24,13 @@ namespace extensions {
// Lives entirely on the FILE thread.
class SettingsBackend : public SyncableService {
public:
+ // |storage_factory| is use to create leveldb storage areas.
// |base_path| is the base of the extension settings directory, so the
// databases will be at base_path/extension_id.
// |observers| is the list of observers to settings changes.
explicit SettingsBackend(
+ // Ownership NOT taken.
+ SettingsStorageFactory* storage_factory,
const FilePath& base_path,
const scoped_refptr<SettingsObserverList>& observers);
@@ -68,6 +72,9 @@ class SettingsBackend : public SyncableService {
// installed extensions.
std::set<std::string> GetKnownExtensionIDs() const;
+ // The Factory to use for creating leveldb storage areas. Not owned.
+ SettingsStorageFactory* const storage_factory_;
Matt Perry 2011/11/11 00:49:38 Is there a reason this is const? This will just pr
not at google - send to devlin 2011/11/12 02:10:27 Yep that was deliberate. It could be "const Setti
+
// The base file path to create any leveldb databases at.
const FilePath base_path_;

Powered by Google App Engine
This is Rietveld 408576698