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

Unified Diff: chrome/browser/extensions/extension_system_impl.cc

Issue 2520833003: Create ExtensionSystemImpl::quota_service_ before loading any extension (Closed)
Patch Set: ok Created 4 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/extension_system_impl.cc
diff --git a/chrome/browser/extensions/extension_system_impl.cc b/chrome/browser/extensions/extension_system_impl.cc
index bdaf85049b87e4a3dd4302e2aeb140500c708eb3..cf006e50ddd8a670ea7ac133d514c2f2e7338a66 100644
--- a/chrome/browser/extensions/extension_system_impl.cc
+++ b/chrome/browser/extensions/extension_system_impl.cc
@@ -275,6 +275,13 @@ void ExtensionSystemImpl::Shared::Init(bool extensions_enabled) {
InitInstallGates();
+ // ExtensionService::Init() might finish loading a component extension before
Devlin 2016/11/22 16:02:20 Could we shorten this to simply: // Extension API
lazyboy 2016/11/22 19:33:30 Done.
+ // Init() completes, e.g. when Init() is blocked showing an extension load
+ // error. In that case extension API call from any component extension can
+ // arrive at ExtensionFunctionDispatcher, which will access |quota_service_|.
+ // So initialize |quota_service_| before calling Init().
+ quota_service_.reset(new QuotaService);
+
extension_service_->Init();
// Make sure ExtensionSyncService is created.
@@ -282,8 +289,6 @@ void ExtensionSystemImpl::Shared::Init(bool extensions_enabled) {
// Make the chrome://extension-icon/ resource available.
content::URLDataSource::Add(profile_, new ExtensionIconSource(profile_));
-
- quota_service_.reset(new QuotaService);
}
void ExtensionSystemImpl::Shared::Shutdown() {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698