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

Unified Diff: chrome/browser/extensions/extension_host.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/extensions/extension_host.cc
diff --git a/chrome/browser/extensions/extension_host.cc b/chrome/browser/extensions/extension_host.cc
index 8ef2f92c1c7e8fedb6ba920d5991b5fc33869dc7..b4544cf71ae3b3053c48ac4cd3499e5bfe1d97e1 100644
--- a/chrome/browser/extensions/extension_host.cc
+++ b/chrome/browser/extensions/extension_host.cc
@@ -229,7 +229,8 @@ void ExtensionHost::CreateRenderViewNow() {
LoadInitialURL();
if (is_background_page()) {
DCHECK(IsRenderViewLive());
- profile_->GetExtensionService()->DidCreateRenderViewForBackgroundPage(this);
+ extensions::ExtensionSystem::Get(profile_)->extension_service()->
+ DidCreateRenderViewForBackgroundPage(this);
}
}
@@ -245,7 +246,8 @@ const GURL& ExtensionHost::GetURL() const {
void ExtensionHost::LoadInitialURL() {
if (!is_background_page() &&
- !profile_->GetExtensionService()->IsBackgroundPageReady(extension_)) {
+ !extensions::ExtensionSystem::Get(profile_)->extension_service()->
+ IsBackgroundPageReady(extension_)) {
// Make sure the background page loads before any others.
registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_BACKGROUND_PAGE_READY,
content::Source<Extension>(extension_));
@@ -269,7 +271,7 @@ void ExtensionHost::Observe(int type,
const content::NotificationDetails& details) {
switch (type) {
case chrome::NOTIFICATION_EXTENSION_BACKGROUND_PAGE_READY:
- DCHECK(profile_->GetExtensionService()->
+ DCHECK(extensions::ExtensionSystem::Get(profile_)->extension_service()->
IsBackgroundPageReady(extension_));
LoadInitialURL();
break;
@@ -387,7 +389,8 @@ void ExtensionHost::DocumentAvailableInMainFrame() {
document_element_available_ = true;
if (is_background_page()) {
- profile_->GetExtensionService()->SetBackgroundPageReady(extension_);
+ extensions::ExtensionSystem::Get(profile_)->extension_service()->
+ SetBackgroundPageReady(extension_);
} else {
switch (extension_host_type_) {
case chrome::VIEW_TYPE_EXTENSION_INFOBAR:

Powered by Google App Engine
This is Rietveld 408576698