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

Unified Diff: chrome/browser/background/background_application_list_model.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_application_list_model.cc
diff --git a/chrome/browser/background/background_application_list_model.cc b/chrome/browser/background/background_application_list_model.cc
index 3b2faf07a2ef2581f3f4f3236ff0b3d1790c7bad..77c5f609ab04797760ca3e07d774ca5edb72916f 100644
--- a/chrome/browser/background/background_application_list_model.cc
+++ b/chrome/browser/background/background_application_list_model.cc
@@ -16,6 +16,7 @@
#include "chrome/browser/browser_process.h"
#include "chrome/browser/extensions/extension_prefs.h"
#include "chrome/browser/extensions/extension_service.h"
+#include "chrome/browser/extensions/extension_system.h"
#include "chrome/browser/extensions/image_loader.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/common/chrome_notification_types.h"
@@ -181,7 +182,8 @@ BackgroundApplicationListModel::BackgroundApplicationListModel(Profile* profile)
registrar_.Add(this,
chrome::NOTIFICATION_BACKGROUND_CONTENTS_SERVICE_CHANGED,
content::Source<Profile>(profile));
- ExtensionService* service = profile->GetExtensionService();
+ ExtensionService* service = extensions::ExtensionSystem::Get(profile)->
+ extension_service();
if (service && service->is_ready())
Update();
}
@@ -312,7 +314,8 @@ void BackgroundApplicationListModel::Observe(
Update();
return;
}
- ExtensionService* service = profile_->GetExtensionService();
+ ExtensionService* service = extensions::ExtensionSystem::Get(profile_)->
+ extension_service();
if (!service || !service->is_ready())
return;
@@ -391,7 +394,8 @@ void BackgroundApplicationListModel::RemoveObserver(Observer* observer) {
// differs from the old list, it generates OnApplicationListChanged events for
// each observer.
void BackgroundApplicationListModel::Update() {
- ExtensionService* service = profile_->GetExtensionService();
+ ExtensionService* service = extensions::ExtensionSystem::Get(profile_)->
+ extension_service();
// Discover current background applications, compare with previous list, which
// is consistently sorted, and notify observers if they differ.

Powered by Google App Engine
This is Rietveld 408576698