Index: chrome/browser/background/background_mode_manager.cc |
diff --git a/chrome/browser/background/background_mode_manager.cc b/chrome/browser/background/background_mode_manager.cc |
index d4df3fac0207498e735ded928b74954b77b9f6fa..6c7e8471a0edfcc70a87bd836c7146a9fefa6a97 100644 |
--- a/chrome/browser/background/background_mode_manager.cc |
+++ b/chrome/browser/background/background_mode_manager.cc |
@@ -17,6 +17,7 @@ |
#include "chrome/browser/browser_process.h" |
#include "chrome/browser/browser_shutdown.h" |
#include "chrome/browser/extensions/extension_service.h" |
+#include "chrome/browser/extensions/extension_system.h" |
#include "chrome/browser/lifetime/application_lifetime.h" |
#include "chrome/browser/prefs/pref_service.h" |
#include "chrome/browser/profiles/profile.h" |
@@ -264,7 +265,8 @@ void BackgroundModeManager::RegisterProfile(Profile* profile) { |
void BackgroundModeManager::LaunchBackgroundApplication( |
Profile* profile, |
const Extension* extension) { |
- ExtensionService* service = profile->GetExtensionService(); |
+ ExtensionService* service = extensions::ExtensionSystem::Get(profile)-> |
+ extension_service(); |
extension_misc::LaunchContainer launch_container = |
service->extension_prefs()->GetLaunchContainer( |
extension, extensions::ExtensionPrefs::LAUNCH_REGULAR); |
@@ -300,8 +302,10 @@ void BackgroundModeManager::Observe( |
*extension, profile)) { |
// Extensions loaded after the ExtensionsService is ready should be |
// treated as new installs. |
- if (profile->GetExtensionService()->is_ready()) |
+ if (extensions::ExtensionSystem::Get(profile)->extension_service()-> |
+ is_ready()) { |
OnBackgroundAppInstalled(extension); |
+ } |
} |
} |
break; |