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_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> |
11 | 11 |
12 #include "base/memory/linked_ptr.h" | 12 #include "base/memory/linked_ptr.h" |
13 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
14 #include "base/prefs/scoped_user_pref_update.h" | 14 #include "base/prefs/scoped_user_pref_update.h" |
15 #include "base/time/time.h" | 15 #include "base/time/time.h" |
16 #include "base/values.h" | 16 #include "base/values.h" |
17 #include "chrome/browser/extensions/extension_scoped_prefs.h" | 17 #include "chrome/browser/extensions/extension_scoped_prefs.h" |
18 #include "components/browser_context_keyed_service/browser_context_keyed_service
.h" | 18 #include "components/browser_context_keyed_service/browser_context_keyed_service
.h" |
19 #include "extensions/browser/app_sorting.h" | 19 #include "extensions/browser/app_sorting.h" |
20 #include "extensions/common/constants.h" | 20 #include "extensions/common/constants.h" |
21 #include "extensions/common/extension.h" | 21 #include "extensions/common/extension.h" |
22 #include "extensions/common/url_pattern_set.h" | 22 #include "extensions/common/url_pattern_set.h" |
23 #include "sync/api/string_ordinal.h" | 23 #include "sync/api/string_ordinal.h" |
24 | 24 |
25 class ExtensionPrefValueMap; | 25 class ExtensionPrefValueMap; |
26 class PrefService; | 26 class PrefService; |
27 class Profile; | 27 |
| 28 namespace content { |
| 29 class BrowserContext; |
| 30 } |
28 | 31 |
29 namespace user_prefs { | 32 namespace user_prefs { |
30 class PrefRegistrySyncable; | 33 class PrefRegistrySyncable; |
31 } | 34 } |
32 | 35 |
33 namespace extensions { | 36 namespace extensions { |
34 | 37 |
35 class AppSorting; | 38 class AppSorting; |
36 class ContentSettingsStore; | 39 class ContentSettingsStore; |
37 class ExtensionPrefsUninstallExtension; | 40 class ExtensionPrefsUninstallExtension; |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
151 static ExtensionPrefs* Create( | 154 static ExtensionPrefs* Create( |
152 PrefService* prefs, | 155 PrefService* prefs, |
153 const base::FilePath& root_dir, | 156 const base::FilePath& root_dir, |
154 ExtensionPrefValueMap* extension_pref_value_map, | 157 ExtensionPrefValueMap* extension_pref_value_map, |
155 scoped_ptr<AppSorting> app_sorting, | 158 scoped_ptr<AppSorting> app_sorting, |
156 bool extensions_disabled, | 159 bool extensions_disabled, |
157 scoped_ptr<TimeProvider> time_provider); | 160 scoped_ptr<TimeProvider> time_provider); |
158 | 161 |
159 virtual ~ExtensionPrefs(); | 162 virtual ~ExtensionPrefs(); |
160 | 163 |
161 // Convenience function to get the ExtensionPrefs for a Profile. | 164 // Convenience function to get the ExtensionPrefs for a BrowserContext. |
162 static ExtensionPrefs* Get(Profile* profile); | 165 static ExtensionPrefs* Get(content::BrowserContext* context); |
163 | 166 |
164 // Returns all installed extensions from extension preferences provided by | 167 // Returns all installed extensions from extension preferences provided by |
165 // |pref_service|. This is exposed for ProtectedPrefsWatcher because it needs | 168 // |pref_service|. This is exposed for ProtectedPrefsWatcher because it needs |
166 // access to the extension ID list before the ExtensionService is initialized. | 169 // access to the extension ID list before the ExtensionService is initialized. |
167 static ExtensionIdList GetExtensionsFrom(const PrefService* pref_service); | 170 static ExtensionIdList GetExtensionsFrom(const PrefService* pref_service); |
168 | 171 |
169 // Returns true if the specified external extension was uninstalled by the | 172 // Returns true if the specified external extension was uninstalled by the |
170 // user. | 173 // user. |
171 bool IsExternalExtensionUninstalled(const std::string& id) const; | 174 bool IsExternalExtensionUninstalled(const std::string& id) const; |
172 | 175 |
(...skipping 480 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
653 scoped_ptr<TimeProvider> time_provider_; | 656 scoped_ptr<TimeProvider> time_provider_; |
654 | 657 |
655 bool extensions_disabled_; | 658 bool extensions_disabled_; |
656 | 659 |
657 DISALLOW_COPY_AND_ASSIGN(ExtensionPrefs); | 660 DISALLOW_COPY_AND_ASSIGN(ExtensionPrefs); |
658 }; | 661 }; |
659 | 662 |
660 } // namespace extensions | 663 } // namespace extensions |
661 | 664 |
662 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_PREFS_H_ | 665 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_PREFS_H_ |
OLD | NEW |