diff options
author | jamescook@chromium.org <jamescook@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-03-12 05:16:59 +0000 |
---|---|---|
committer | jamescook@chromium.org <jamescook@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-03-12 05:16:59 +0000 |
commit | e512c79c74ff343b1459dc607d45cb8ea8e68c26 (patch) | |
tree | d177ca323a8248eb035dc8f460fa251f0c6f0869 /extensions | |
parent | fa9a7fd718fc4b14b04db900de252cfe29e4c24a (diff) | |
download | chromium_src-e512c79c74ff343b1459dc607d45cb8ea8e68c26.zip chromium_src-e512c79c74ff343b1459dc607d45cb8ea8e68c26.tar.gz chromium_src-e512c79c74ff343b1459dc607d45cb8ea8e68c26.tar.bz2 |
Remove ExtensionService reference from extensions ProcessManager
Use ExtensionSystem to check if the extensions system is ready instead.
Long ago Chrome OS did not create an ExtensionService at the login screen.
This is no longer true, so this code is equivalent to the old behavior.
BUG=351152
TEST=manual, Chrome OS boots and loads extensions like AdBlock
Review URL: https://codereview.chromium.org/195493002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@256440 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'extensions')
-rw-r--r-- | extensions/browser/process_manager.cc | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/extensions/browser/process_manager.cc b/extensions/browser/process_manager.cc index 6298553..db0a76d 100644 --- a/extensions/browser/process_manager.cc +++ b/extensions/browser/process_manager.cc @@ -16,7 +16,6 @@ #include "chrome/browser/chrome_notification_types.h" #include "chrome/browser/extensions/api/runtime/runtime_api.h" #include "chrome/browser/extensions/extension_host.h" -#include "chrome/browser/extensions/extension_service.h" #include "chrome/common/extensions/extension_messages.h" #include "content/public/browser/browser_context.h" #include "content/public/browser/browser_thread.h" @@ -39,6 +38,7 @@ #include "extensions/common/extension.h" #include "extensions/common/manifest_handlers/background_info.h" #include "extensions/common/manifest_handlers/incognito_info.h" +#include "extensions/common/one_shot_event.h" #include "extensions/common/switches.h" using content::BrowserContext; @@ -594,12 +594,10 @@ void ProcessManager::CancelSuspend(const Extension* extension) { } void ProcessManager::OnBrowserWindowReady() { - ExtensionService* service = ExtensionSystem::Get( - GetBrowserContext())->extension_service(); - // On Chrome OS, a login screen is implemented as a browser. - // This browser has no extension service. In this case, - // service will be NULL. - if (!service || !service->is_ready()) + // If the extension system isn't ready yet the background hosts will be + // created via NOTIFICATION_EXTENSIONS_READY below. + ExtensionSystem* system = ExtensionSystem::Get(GetBrowserContext()); + if (!system->ready().is_signaled()) return; CreateBackgroundHostsForProfileStartup(); |