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

Side by Side Diff: chrome/browser/extensions/extension_scoped_prefs.h

Issue 10689097: Enforce the 'requirements' field in manifests. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 4 months 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 unified diff | Download patch
OLDNEW
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 ~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 // Sets the pref |key| for extension |id| to |value|.
19 virtual void UpdateExtensionPrefList(
20 const std::string& id,
21 const std::string& key,
22 const std::vector<std::string>& value) = 0;
23
18 // Deletes the pref dictionary for extension |id|. 24 // Deletes the pref dictionary for extension |id|.
19 virtual void DeleteExtensionPrefs(const std::string& id) = 0; 25 virtual void DeleteExtensionPrefs(const std::string& id) = 0;
20 26
21 // Reads a boolean pref |pref_key| from extension with id |extension_id|. 27 // Reads a boolean pref |pref_key| from extension with id |extension_id|.
22 virtual bool ReadExtensionPrefBoolean(const std::string& extension_id, 28 virtual bool ReadExtensionPrefBoolean(const std::string& extension_id,
23 const std::string& pref_key) const = 0; 29 const std::string& pref_key) const = 0;
24 30
25 // Reads an integer pref |pref_key| from extension with id |extension_id|. 31 // Reads an integer pref |pref_key| from extension with id |extension_id|.
26 virtual bool ReadExtensionPrefInteger(const std::string& extension_id, 32 virtual bool ReadExtensionPrefInteger(const std::string& extension_id,
27 const std::string& pref_key, 33 const std::string& pref_key,
28 int* out_value) const = 0; 34 int* out_value) const = 0;
29 35
30 // Reads a list pref |pref_key| from extension with id |extension_id|. 36 // Reads a list pref |pref_key| from extension with id |extension_id|.
31 virtual bool ReadExtensionPrefList( 37 virtual bool ReadExtensionPrefList(
32 const std::string& extension_id, 38 const std::string& extension_id,
33 const std::string& pref_key, 39 const std::string& pref_key,
34 const base::ListValue** out_value) const = 0; 40 const base::ListValue** out_value) const = 0;
35 41
42 // Reads a list of string prefs |pref_key| from extension with id
43 // |extension_id|.
44 virtual bool ReadExtensionPrefStringList(
45 const std::string& extension_id,
46 const std::string& pref_key,
47 std::vector<std::string>* out_value) const = 0;
48
36 // Reads a string pref |pref_key| from extension with id |extension_id|. 49 // Reads a string pref |pref_key| from extension with id |extension_id|.
37 virtual bool ReadExtensionPrefString(const std::string& extension_id, 50 virtual bool ReadExtensionPrefString(const std::string& extension_id,
38 const std::string& pref_key, 51 const std::string& pref_key,
39 std::string* out_value) const = 0; 52 std::string* out_value) const = 0;
40 }; 53 };
41 54
42 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SCOPED_PREFS_H_ 55 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SCOPED_PREFS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698