Chromium Code Reviews| 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() { |