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

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

Issue 46853004: Move ExtensionPrefs and friends to extensions/ directory. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sync and update app_shell Created 6 years, 11 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 | Annotate | Revision Log
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_SCOPED_PREFS_H_
6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_SCOPED_PREFS_H_
7
8 namespace extensions {
9
10 class ExtensionScopedPrefs {
11 public:
12 ExtensionScopedPrefs() {}
13 ~ExtensionScopedPrefs() {}
14
15 // Sets the pref |key| for extension |id| to |value|.
16 virtual void UpdateExtensionPref(const std::string& id,
17 const std::string& key,
18 base::Value* value) = 0;
19
20 // Deletes the pref dictionary for extension |id|.
21 virtual void DeleteExtensionPrefs(const std::string& id) = 0;
22
23 // Reads a boolean pref |pref_key| from extension with id |extension_id|.
24 virtual bool ReadPrefAsBoolean(const std::string& extension_id,
25 const std::string& pref_key,
26 bool* out_value) const = 0;
27
28 // Reads an integer pref |pref_key| from extension with id |extension_id|.
29 virtual bool ReadPrefAsInteger(const std::string& extension_id,
30 const std::string& pref_key,
31 int* out_value) const = 0;
32
33 // Reads a string pref |pref_key| from extension with id |extension_id|.
34 virtual bool ReadPrefAsString(const std::string& extension_id,
35 const std::string& pref_key,
36 std::string* out_value) const = 0;
37
38 // Reads a list pref |pref_key| from extension with id |extension_id|.
39 virtual bool ReadPrefAsList(const std::string& extension_id,
40 const std::string& pref_key,
41 const base::ListValue** out_value) const = 0;
42
43 // Reads a dictionary pref |pref_key| from extension with id |extension_id|.
44 virtual bool ReadPrefAsDictionary(
45 const std::string& extension_id,
46 const std::string& pref_key,
47 const base::DictionaryValue** out_value) const = 0;
48
49 // Returns true if the prefs contain an entry for an extension with id
50 // |extension_id|.
51 virtual bool HasPrefForExtension(const std::string& extension_id) const = 0;
52 };
53
54 } // namespace extensions
55
56 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SCOPED_PREFS_H_
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_prefs_unittest.cc ('k') | chrome/browser/extensions/extension_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698