OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_SCOPED_PREFS_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_SCOPED_PREFS_H_ |
6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_SCOPED_PREFS_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_SCOPED_PREFS_H_ |
7 | 7 |
8 class ExtensionScopedPrefs { | 8 class ExtensionScopedPrefs { |
9 public: | 9 public: |
10 ExtensionScopedPrefs() {} | 10 ExtensionScopedPrefs() {} |
11 ~ExtensionScopedPrefs() {} | 11 virtual ~ExtensionScopedPrefs() {} |
12 | 12 |
13 // Sets the pref |key| for extension |id| to |value|. | 13 // Sets the pref |key| for extension |id| to |value|. |
14 virtual void UpdateExtensionPref(const std::string& id, | 14 virtual void UpdateExtensionPref(const std::string& id, |
15 const std::string& key, | 15 const std::string& key, |
16 base::Value* value) = 0; | 16 base::Value* value) = 0; |
17 | 17 |
18 // Deletes the pref dictionary for extension |id|. | 18 // Deletes the pref dictionary for extension |id|. |
19 virtual void DeleteExtensionPrefs(const std::string& id) = 0; | 19 virtual void DeleteExtensionPrefs(const std::string& id) = 0; |
20 | 20 |
21 // Reads a boolean pref |pref_key| from extension with id |extension_id|. | 21 // Reads a boolean pref |pref_key| from extension with id |extension_id|. |
(...skipping 11 matching lines...) Expand all Loading... |
33 const std::string& pref_key, | 33 const std::string& pref_key, |
34 const base::ListValue** out_value) const = 0; | 34 const base::ListValue** out_value) const = 0; |
35 | 35 |
36 // Reads a string pref |pref_key| from extension with id |extension_id|. | 36 // Reads a string pref |pref_key| from extension with id |extension_id|. |
37 virtual bool ReadExtensionPrefString(const std::string& extension_id, | 37 virtual bool ReadExtensionPrefString(const std::string& extension_id, |
38 const std::string& pref_key, | 38 const std::string& pref_key, |
39 std::string* out_value) const = 0; | 39 std::string* out_value) const = 0; |
40 }; | 40 }; |
41 | 41 |
42 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SCOPED_PREFS_H_ | 42 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SCOPED_PREFS_H_ |
OLD | NEW |