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

Unified Diff: chrome/browser/background/background_mode_manager.cc

Issue 11365181: Remove GetExtensionService from Profile. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: tweaks Created 8 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
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;

Powered by Google App Engine
This is Rietveld 408576698