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

Unified Diff: chrome/browser/extensions/extension_pref_store.h

Issue 5646003: Sanitize PrefStore interface. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix PrefService mock construction in PrefServiceTest to include command line store. Created 10 years 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/extension_pref_store.h
diff --git a/chrome/browser/extensions/extension_pref_store.h b/chrome/browser/extensions/extension_pref_store.h
new file mode 100644
index 0000000000000000000000000000000000000000..f2db8096692e56a7523af315865ee76d8d2d0b5c
--- /dev/null
+++ b/chrome/browser/extensions/extension_pref_store.h
@@ -0,0 +1,36 @@
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_PREF_STORE_H_
+#define CHROME_BROWSER_EXTENSIONS_EXTENSION_PREF_STORE_H_
+#pragma once
+
+#include "chrome/browser/prefs/value_map_pref_store.h"
+
+// A PrefStore implementation that holds preferences set by extensions.
+class ExtensionPrefStore : public ValueMapPrefStore {
+ public:
+ ExtensionPrefStore();
+ virtual ~ExtensionPrefStore() {}
+
+ // Set an extension preference |value| for |key|. Takes ownership of |value|.
+ void SetExtensionPref(const std::string& key, Value* value);
+
+ // Remove the extension preference value for |key|.
+ void RemoveExtensionPref(const std::string& key);
+
+ // Tell the store it's now fully initialized.
+ void OnInitializationCompleted();
+
+ private:
+ // PrefStore overrides:
+ virtual bool IsInitializationComplete() const;
+
+ bool initialization_complete_;
+
+ DISALLOW_COPY_AND_ASSIGN(ExtensionPrefStore);
+};
+
+
+#endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_PREF_STORE_H_

Powered by Google App Engine
This is Rietveld 408576698