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

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: replace missing extension_system include 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 1dcb1bea2d7798c203ab5c3727bd10df5e93d54b..06618dc2b1e8123ba4483229e2fb11c0ba8d250a 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"
@@ -266,7 +267,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);
@@ -302,8 +304,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;
« no previous file with comments | « chrome/browser/background/background_contents_service.cc ('k') | chrome/browser/chrome_content_browser_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698