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 CHROME_BROWSER_EXTENSIONS_EXTENSION_SYSTEM_IMPL_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_SYSTEM_IMPL_H_ |
6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_SYSTEM_IMPL_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_SYSTEM_IMPL_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 void RegisterExtensionWithRequestContexts( | 54 void RegisterExtensionWithRequestContexts( |
55 const Extension* extension, | 55 const Extension* extension, |
56 const base::Closure& callback) override; | 56 const base::Closure& callback) override; |
57 | 57 |
58 void UnregisterExtensionWithRequestContexts( | 58 void UnregisterExtensionWithRequestContexts( |
59 const std::string& extension_id, | 59 const std::string& extension_id, |
60 const UnloadedExtensionInfo::Reason reason) override; | 60 const UnloadedExtensionInfo::Reason reason) override; |
61 | 61 |
62 const OneShotEvent& ready() const override; | 62 const OneShotEvent& ready() const override; |
63 ContentVerifier* content_verifier() override; // shared | 63 ContentVerifier* content_verifier() override; // shared |
64 scoped_ptr<ExtensionSet> GetDependentExtensions( | 64 std::unique_ptr<ExtensionSet> GetDependentExtensions( |
65 const Extension* extension) override; | 65 const Extension* extension) override; |
66 void InstallUpdate(const std::string& extension_id, | 66 void InstallUpdate(const std::string& extension_id, |
67 const base::FilePath& temp_dir) override; | 67 const base::FilePath& temp_dir) override; |
68 | 68 |
69 private: | 69 private: |
70 friend class ExtensionSystemSharedFactory; | 70 friend class ExtensionSystemSharedFactory; |
71 | 71 |
72 // Owns the Extension-related systems that have a single instance | 72 // Owns the Extension-related systems that have a single instance |
73 // shared between normal and incognito profiles. | 73 // shared between normal and incognito profiles. |
74 class Shared : public KeyedService { | 74 class Shared : public KeyedService { |
(...skipping 22 matching lines...) Expand all Loading... |
97 QuotaService* quota_service(); | 97 QuotaService* quota_service(); |
98 AppSorting* app_sorting(); | 98 AppSorting* app_sorting(); |
99 const OneShotEvent& ready() const { return ready_; } | 99 const OneShotEvent& ready() const { return ready_; } |
100 ContentVerifier* content_verifier(); | 100 ContentVerifier* content_verifier(); |
101 | 101 |
102 private: | 102 private: |
103 Profile* profile_; | 103 Profile* profile_; |
104 | 104 |
105 // The services that are shared between normal and incognito profiles. | 105 // The services that are shared between normal and incognito profiles. |
106 | 106 |
107 scoped_ptr<StateStore> state_store_; | 107 std::unique_ptr<StateStore> state_store_; |
108 scoped_ptr<StateStoreNotificationObserver> | 108 std::unique_ptr<StateStoreNotificationObserver> |
109 state_store_notification_observer_; | 109 state_store_notification_observer_; |
110 scoped_ptr<StateStore> rules_store_; | 110 std::unique_ptr<StateStore> rules_store_; |
111 scoped_refptr<ValueStoreFactoryImpl> store_factory_; | 111 scoped_refptr<ValueStoreFactoryImpl> store_factory_; |
112 scoped_ptr<NavigationObserver> navigation_observer_; | 112 std::unique_ptr<NavigationObserver> navigation_observer_; |
113 scoped_ptr<ServiceWorkerManager> service_worker_manager_; | 113 std::unique_ptr<ServiceWorkerManager> service_worker_manager_; |
114 // Shared memory region manager for scripts statically declared in extension | 114 // Shared memory region manager for scripts statically declared in extension |
115 // manifests. This region is shared between all extensions. | 115 // manifests. This region is shared between all extensions. |
116 scoped_ptr<SharedUserScriptMaster> shared_user_script_master_; | 116 std::unique_ptr<SharedUserScriptMaster> shared_user_script_master_; |
117 scoped_ptr<RuntimeData> runtime_data_; | 117 std::unique_ptr<RuntimeData> runtime_data_; |
118 // ExtensionService depends on StateStore, Blacklist and RuntimeData. | 118 // ExtensionService depends on StateStore, Blacklist and RuntimeData. |
119 scoped_ptr<ExtensionService> extension_service_; | 119 std::unique_ptr<ExtensionService> extension_service_; |
120 scoped_ptr<ManagementPolicy> management_policy_; | 120 std::unique_ptr<ManagementPolicy> management_policy_; |
121 // extension_info_map_ needs to outlive process_manager_. | 121 // extension_info_map_ needs to outlive process_manager_. |
122 scoped_refptr<InfoMap> extension_info_map_; | 122 scoped_refptr<InfoMap> extension_info_map_; |
123 scoped_ptr<QuotaService> quota_service_; | 123 std::unique_ptr<QuotaService> quota_service_; |
124 scoped_ptr<AppSorting> app_sorting_; | 124 std::unique_ptr<AppSorting> app_sorting_; |
125 | 125 |
126 // For verifying the contents of extensions read from disk. | 126 // For verifying the contents of extensions read from disk. |
127 scoped_refptr<ContentVerifier> content_verifier_; | 127 scoped_refptr<ContentVerifier> content_verifier_; |
128 | 128 |
129 scoped_ptr<UninstallPingSender> uninstall_ping_sender_; | 129 std::unique_ptr<UninstallPingSender> uninstall_ping_sender_; |
130 | 130 |
131 #if defined(OS_CHROMEOS) | 131 #if defined(OS_CHROMEOS) |
132 scoped_ptr<chromeos::DeviceLocalAccountManagementPolicyProvider> | 132 std::unique_ptr<chromeos::DeviceLocalAccountManagementPolicyProvider> |
133 device_local_account_management_policy_provider_; | 133 device_local_account_management_policy_provider_; |
134 #endif | 134 #endif |
135 | 135 |
136 OneShotEvent ready_; | 136 OneShotEvent ready_; |
137 }; | 137 }; |
138 | 138 |
139 Profile* profile_; | 139 Profile* profile_; |
140 | 140 |
141 Shared* shared_; | 141 Shared* shared_; |
142 | 142 |
143 DISALLOW_COPY_AND_ASSIGN(ExtensionSystemImpl); | 143 DISALLOW_COPY_AND_ASSIGN(ExtensionSystemImpl); |
144 }; | 144 }; |
145 | 145 |
146 } // namespace extensions | 146 } // namespace extensions |
147 | 147 |
148 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SYSTEM_IMPL_H_ | 148 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SYSTEM_IMPL_H_ |
OLD | NEW |