| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 EXTENSIONS_BROWSER_EXTENSION_PREFS_H_ | 5 #ifndef EXTENSIONS_BROWSER_EXTENSION_PREFS_H_ |
| 6 #define EXTENSIONS_BROWSER_EXTENSION_PREFS_H_ | 6 #define EXTENSIONS_BROWSER_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 "components/browser_context_keyed_service/browser_context_keyed_service
.h" | 17 #include "components/keyed_service/core/keyed_service.h" |
| 18 #include "extensions/browser/app_sorting.h" | 18 #include "extensions/browser/app_sorting.h" |
| 19 #include "extensions/browser/blacklist_state.h" | 19 #include "extensions/browser/blacklist_state.h" |
| 20 #include "extensions/browser/extension_scoped_prefs.h" | 20 #include "extensions/browser/extension_scoped_prefs.h" |
| 21 #include "extensions/common/constants.h" | 21 #include "extensions/common/constants.h" |
| 22 #include "extensions/common/extension.h" | 22 #include "extensions/common/extension.h" |
| 23 #include "extensions/common/url_pattern_set.h" | 23 #include "extensions/common/url_pattern_set.h" |
| 24 #include "sync/api/string_ordinal.h" | 24 #include "sync/api/string_ordinal.h" |
| 25 | 25 |
| 26 class ExtensionPrefValueMap; | 26 class ExtensionPrefValueMap; |
| 27 class PrefService; | 27 class PrefService; |
| (...skipping 21 matching lines...) Expand all Loading... |
| 49 // with an individual extension, such as lastUpdateTime. | 49 // with an individual extension, such as lastUpdateTime. |
| 50 // - per-extension preferences: | 50 // - per-extension preferences: |
| 51 // meta-preferences describing properties of the extension like | 51 // meta-preferences describing properties of the extension like |
| 52 // installation time, whether the extension is enabled, etc. | 52 // installation time, whether the extension is enabled, etc. |
| 53 // - extension controlled preferences: | 53 // - extension controlled preferences: |
| 54 // browser preferences that an extension controls. For example, an | 54 // browser preferences that an extension controls. For example, an |
| 55 // extension could use the proxy API to specify the browser's proxy | 55 // extension could use the proxy API to specify the browser's proxy |
| 56 // preference. Extension-controlled preferences are stored in | 56 // preference. Extension-controlled preferences are stored in |
| 57 // PrefValueStore::extension_prefs(), which this class populates and | 57 // PrefValueStore::extension_prefs(), which this class populates and |
| 58 // maintains as the underlying extensions change. | 58 // maintains as the underlying extensions change. |
| 59 class ExtensionPrefs : public ExtensionScopedPrefs, | 59 class ExtensionPrefs : public ExtensionScopedPrefs, public KeyedService { |
| 60 public BrowserContextKeyedService { | |
| 61 public: | 60 public: |
| 62 typedef std::vector<linked_ptr<ExtensionInfo> > ExtensionsInfo; | 61 typedef std::vector<linked_ptr<ExtensionInfo> > ExtensionsInfo; |
| 63 | 62 |
| 64 // Vector containing identifiers for preferences. | 63 // Vector containing identifiers for preferences. |
| 65 typedef std::set<std::string> PrefKeySet; | 64 typedef std::set<std::string> PrefKeySet; |
| 66 | 65 |
| 67 // This enum is used to store the reason an extension's install has been | 66 // This enum is used to store the reason an extension's install has been |
| 68 // delayed. Do not remove items or re-order this enum as it is used in | 67 // delayed. Do not remove items or re-order this enum as it is used in |
| 69 // preferences. | 68 // preferences. |
| 70 enum DelayReason { | 69 enum DelayReason { |
| (...skipping 572 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 643 scoped_ptr<TimeProvider> time_provider_; | 642 scoped_ptr<TimeProvider> time_provider_; |
| 644 | 643 |
| 645 bool extensions_disabled_; | 644 bool extensions_disabled_; |
| 646 | 645 |
| 647 DISALLOW_COPY_AND_ASSIGN(ExtensionPrefs); | 646 DISALLOW_COPY_AND_ASSIGN(ExtensionPrefs); |
| 648 }; | 647 }; |
| 649 | 648 |
| 650 } // namespace extensions | 649 } // namespace extensions |
| 651 | 650 |
| 652 #endif // EXTENSIONS_BROWSER_EXTENSION_PREFS_H_ | 651 #endif // EXTENSIONS_BROWSER_EXTENSION_PREFS_H_ |
| OLD | NEW |