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

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

Issue 15517005: Remove references to Profile from browser_context_keyed_service. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase & style Created 7 years, 7 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
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_PREFS_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_PREFS_H_
6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_PREFS_H_ 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_PREFS_H_
7 7
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 // meta-preferences describing properties of the extension like 45 // meta-preferences describing properties of the extension like
46 // installation time, whether the extension is enabled, etc. 46 // installation time, whether the extension is enabled, etc.
47 // - extension controlled preferences: 47 // - extension controlled preferences:
48 // browser preferences that an extension controls. For example, an 48 // browser preferences that an extension controls. For example, an
49 // extension could use the proxy API to specify the browser's proxy 49 // extension could use the proxy API to specify the browser's proxy
50 // preference. Extension-controlled preferences are stored in 50 // preference. Extension-controlled preferences are stored in
51 // PrefValueStore::extension_prefs(), which this class populates and 51 // PrefValueStore::extension_prefs(), which this class populates and
52 // maintains as the underlying extensions change. 52 // maintains as the underlying extensions change.
53 class ExtensionPrefs : public ContentSettingsStore::Observer, 53 class ExtensionPrefs : public ContentSettingsStore::Observer,
54 public ExtensionScopedPrefs, 54 public ExtensionScopedPrefs,
55 public ProfileKeyedService { 55 public BrowserContextKeyedService {
56 public: 56 public:
57 // Key name for a preference that keeps track of per-extension settings. This 57 // Key name for a preference that keeps track of per-extension settings. This
58 // is a dictionary object read from the Preferences file, keyed off of 58 // is a dictionary object read from the Preferences file, keyed off of
59 // extension ids. 59 // extension ids.
60 static const char kExtensionsPref[]; 60 static const char kExtensionsPref[];
61 61
62 // Key for what version chrome was last time the extension prefs were loaded. 62 // Key for what version chrome was last time the extension prefs were loaded.
63 static const char kExtensionsLastChromeVersion[]; 63 static const char kExtensionsLastChromeVersion[];
64 64
65 typedef std::vector<linked_ptr<ExtensionInfo> > ExtensionsInfo; 65 typedef std::vector<linked_ptr<ExtensionInfo> > ExtensionsInfo;
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 // Use this as needed for testing. 145 // Use this as needed for testing.
146 static ExtensionPrefs* Create( 146 static ExtensionPrefs* Create(
147 PrefService* prefs, 147 PrefService* prefs,
148 const base::FilePath& root_dir, 148 const base::FilePath& root_dir,
149 ExtensionPrefValueMap* extension_pref_value_map, 149 ExtensionPrefValueMap* extension_pref_value_map,
150 bool extensions_disabled, 150 bool extensions_disabled,
151 scoped_ptr<TimeProvider> time_provider); 151 scoped_ptr<TimeProvider> time_provider);
152 152
153 virtual ~ExtensionPrefs(); 153 virtual ~ExtensionPrefs();
154 154
155 // ProfileKeyedService implementation. 155 // BrowserContextKeyedService implementation.
156 virtual void Shutdown() OVERRIDE; 156 virtual void Shutdown() OVERRIDE;
157 157
158 // Convenience function to get the ExtensionPrefs for a Profile. 158 // Convenience function to get the ExtensionPrefs for a Profile.
159 static ExtensionPrefs* Get(Profile* profile); 159 static ExtensionPrefs* Get(Profile* profile);
160 160
161 // Returns all installed extensions from extension preferences provided by 161 // Returns all installed extensions from extension preferences provided by
162 // |pref_service|. This is exposed for ProtectedPrefsWatcher because it needs 162 // |pref_service|. This is exposed for ProtectedPrefsWatcher because it needs
163 // access to the extension ID list before the ExtensionService is initialized. 163 // access to the extension ID list before the ExtensionService is initialized.
164 static ExtensionIdList GetExtensionsFrom(const PrefService* pref_service); 164 static ExtensionIdList GetExtensionsFrom(const PrefService* pref_service);
165 165
(...skipping 487 matching lines...) Expand 10 before | Expand all | Expand 10 after
653 scoped_ptr<TimeProvider> time_provider_; 653 scoped_ptr<TimeProvider> time_provider_;
654 654
655 bool extensions_disabled_; 655 bool extensions_disabled_;
656 656
657 DISALLOW_COPY_AND_ASSIGN(ExtensionPrefs); 657 DISALLOW_COPY_AND_ASSIGN(ExtensionPrefs);
658 }; 658 };
659 659
660 } // namespace extensions 660 } // namespace extensions
661 661
662 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_PREFS_H_ 662 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_PREFS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698