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

Unified Diff: base/prefs/writeable_pref_store.h

Issue 98623005: rAc i18n: implement storage interface for libaddressinput (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: scopedvector Created 7 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
« no previous file with comments | « base/prefs/value_map_pref_store.cc ('k') | third_party/libaddressinput/chromium/chrome_storage_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/prefs/writeable_pref_store.h
diff --git a/base/prefs/writeable_pref_store.h b/base/prefs/writeable_pref_store.h
new file mode 100644
index 0000000000000000000000000000000000000000..7950d29d77b7c026340b499aba6962b0be15e689
--- /dev/null
+++ b/base/prefs/writeable_pref_store.h
@@ -0,0 +1,36 @@
+// Copyright 2013 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 BASE_PREFS_WRITEABLE_PREF_STORE_H_
+#define BASE_PREFS_WRITEABLE_PREF_STORE_H_
+
+#include <string>
+
+#include "base/basictypes.h"
+#include "base/prefs/pref_store.h"
+
+namespace base {
+class Value;
+}
+
+// A pref store that can be written to as well as read from.
+class BASE_PREFS_EXPORT WriteablePrefStore : public PrefStore {
+ public:
+ WriteablePrefStore() {}
+
+ // Sets a |value| for |key| in the store. Assumes ownership of |value|, which
+ // must be non-NULL.
+ virtual void SetValue(const std::string& key, base::Value* value) = 0;
+
+ // Removes the value for |key|.
+ virtual void RemoveValue(const std::string& key) = 0;
+
+ protected:
+ virtual ~WriteablePrefStore() {}
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(WriteablePrefStore);
+};
+
+#endif // BASE_PREFS_WRITEABLE_PREF_STORE_H_
« no previous file with comments | « base/prefs/value_map_pref_store.cc ('k') | third_party/libaddressinput/chromium/chrome_storage_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698