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

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

Issue 1890163004: extensions: Abstract out install delay strategy (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: for comments in #4 Created 4 years, 8 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
OLDNEW
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"
11 #include "build/build_config.h" 11 #include "build/build_config.h"
12 #include "extensions/browser/extension_system.h" 12 #include "extensions/browser/extension_system.h"
13 #include "extensions/common/one_shot_event.h" 13 #include "extensions/common/one_shot_event.h"
14 14
15 class Profile; 15 class Profile;
16 class ValueStore; 16 class ValueStore;
17 17
18 namespace extensions { 18 namespace extensions {
19 19
20 class ExtensionSystemSharedFactory; 20 class ExtensionSystemSharedFactory;
21 class NavigationObserver; 21 class NavigationObserver;
22 class StateStoreNotificationObserver; 22 class StateStoreNotificationObserver;
23 class UninstallPingSender; 23 class UninstallPingSender;
24 class InstallGate;
24 class ValueStoreFactory; 25 class ValueStoreFactory;
25 class ValueStoreFactoryImpl; 26 class ValueStoreFactoryImpl;
26 27
27 // The ExtensionSystem for ProfileImpl and OffTheRecordProfileImpl. 28 // The ExtensionSystem for ProfileImpl and OffTheRecordProfileImpl.
28 // Implementation details: non-shared services are owned by 29 // Implementation details: non-shared services are owned by
29 // ExtensionSystemImpl, a KeyedService with separate incognito 30 // ExtensionSystemImpl, a KeyedService with separate incognito
30 // instances. A private Shared class (also a KeyedService, 31 // instances. A private Shared class (also a KeyedService,
31 // but with a shared instance for incognito) keeps the common services. 32 // but with a shared instance for incognito) keeps the common services.
32 class ExtensionSystemImpl : public ExtensionSystem { 33 class ExtensionSystemImpl : public ExtensionSystem {
33 public: 34 public:
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 // shared between normal and incognito profiles. 74 // shared between normal and incognito profiles.
74 class Shared : public KeyedService { 75 class Shared : public KeyedService {
75 public: 76 public:
76 explicit Shared(Profile* profile); 77 explicit Shared(Profile* profile);
77 ~Shared() override; 78 ~Shared() override;
78 79
79 // Initialization takes place in phases. 80 // Initialization takes place in phases.
80 virtual void InitPrefs(); 81 virtual void InitPrefs();
81 // This must not be called until all the providers have been created. 82 // This must not be called until all the providers have been created.
82 void RegisterManagementPolicyProviders(); 83 void RegisterManagementPolicyProviders();
84 void InitInstallGates();
83 void Init(bool extensions_enabled); 85 void Init(bool extensions_enabled);
84 86
85 // KeyedService implementation. 87 // KeyedService implementation.
86 void Shutdown() override; 88 void Shutdown() override;
87 89
88 StateStore* state_store(); 90 StateStore* state_store();
89 StateStore* rules_store(); 91 StateStore* rules_store();
90 scoped_refptr<ValueStoreFactory> store_factory() const; 92 scoped_refptr<ValueStoreFactory> store_factory() const;
91 ExtensionService* extension_service(); 93 ExtensionService* extension_service();
92 RuntimeData* runtime_data(); 94 RuntimeData* runtime_data();
(...skipping 22 matching lines...) Expand all
115 // manifests. This region is shared between all extensions. 117 // manifests. This region is shared between all extensions.
116 std::unique_ptr<SharedUserScriptMaster> shared_user_script_master_; 118 std::unique_ptr<SharedUserScriptMaster> shared_user_script_master_;
117 std::unique_ptr<RuntimeData> runtime_data_; 119 std::unique_ptr<RuntimeData> runtime_data_;
118 // ExtensionService depends on StateStore, Blacklist and RuntimeData. 120 // ExtensionService depends on StateStore, Blacklist and RuntimeData.
119 std::unique_ptr<ExtensionService> extension_service_; 121 std::unique_ptr<ExtensionService> extension_service_;
120 std::unique_ptr<ManagementPolicy> management_policy_; 122 std::unique_ptr<ManagementPolicy> management_policy_;
121 // extension_info_map_ needs to outlive process_manager_. 123 // extension_info_map_ needs to outlive process_manager_.
122 scoped_refptr<InfoMap> extension_info_map_; 124 scoped_refptr<InfoMap> extension_info_map_;
123 std::unique_ptr<QuotaService> quota_service_; 125 std::unique_ptr<QuotaService> quota_service_;
124 std::unique_ptr<AppSorting> app_sorting_; 126 std::unique_ptr<AppSorting> app_sorting_;
127 std::unique_ptr<InstallGate> update_install_gate_;
125 128
126 // For verifying the contents of extensions read from disk. 129 // For verifying the contents of extensions read from disk.
127 scoped_refptr<ContentVerifier> content_verifier_; 130 scoped_refptr<ContentVerifier> content_verifier_;
128 131
129 std::unique_ptr<UninstallPingSender> uninstall_ping_sender_; 132 std::unique_ptr<UninstallPingSender> uninstall_ping_sender_;
130 133
131 #if defined(OS_CHROMEOS) 134 #if defined(OS_CHROMEOS)
132 std::unique_ptr<chromeos::DeviceLocalAccountManagementPolicyProvider> 135 std::unique_ptr<chromeos::DeviceLocalAccountManagementPolicyProvider>
133 device_local_account_management_policy_provider_; 136 device_local_account_management_policy_provider_;
134 #endif 137 #endif
135 138
136 OneShotEvent ready_; 139 OneShotEvent ready_;
137 }; 140 };
138 141
139 Profile* profile_; 142 Profile* profile_;
140 143
141 Shared* shared_; 144 Shared* shared_;
142 145
143 DISALLOW_COPY_AND_ASSIGN(ExtensionSystemImpl); 146 DISALLOW_COPY_AND_ASSIGN(ExtensionSystemImpl);
144 }; 147 };
145 148
146 } // namespace extensions 149 } // namespace extensions
147 150
148 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SYSTEM_IMPL_H_ 151 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SYSTEM_IMPL_H_
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_service_test_base.cc ('k') | chrome/browser/extensions/extension_system_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698