OLD | NEW |
(Empty) | |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef BASE_PREFS_WRITEABLE_PREF_STORE_H_ |
| 6 #define BASE_PREFS_WRITEABLE_PREF_STORE_H_ |
| 7 |
| 8 #include <string> |
| 9 |
| 10 #include "base/basictypes.h" |
| 11 #include "base/prefs/pref_store.h" |
| 12 |
| 13 namespace base { |
| 14 class Value; |
| 15 } |
| 16 |
| 17 // A pref store that can be written to as well as read from. |
| 18 class BASE_PREFS_EXPORT WriteablePrefStore : public PrefStore { |
| 19 public: |
| 20 WriteablePrefStore() {} |
| 21 |
| 22 // Sets a |value| for |key| in the store. Assumes ownership of |value|, which |
| 23 // must be non-NULL. |
| 24 virtual void SetValue(const std::string& key, base::Value* value) = 0; |
| 25 |
| 26 // Removes the value for |key|. |
| 27 virtual void RemoveValue(const std::string& key) = 0; |
| 28 |
| 29 protected: |
| 30 virtual ~WriteablePrefStore() {} |
| 31 |
| 32 private: |
| 33 DISALLOW_COPY_AND_ASSIGN(WriteablePrefStore); |
| 34 }; |
| 35 |
| 36 #endif // BASE_PREFS_WRITEABLE_PREF_STORE_H_ |
OLD | NEW |