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

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: 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/extensions/extension_host.cc
diff --git a/chrome/browser/extensions/extension_host.cc b/chrome/browser/extensions/extension_host.cc
index 821859379ae0898d1ead21a9aa3152fe8c69bc59..f46e8880abe6bb7c7781cc32bf6ea2d4e1009b2a 100644
--- a/chrome/browser/extensions/extension_host.cc
+++ b/chrome/browser/extensions/extension_host.cc
@@ -230,7 +230,8 @@ void ExtensionHost::CreateRenderViewNow() {
LoadInitialURL();
if (is_background_page()) {
DCHECK(IsRenderViewLive());
- profile_->GetExtensionService()->DidCreateRenderViewForBackgroundPage(this);
+ extensions::ExtensionSystem::Get(profile_)->extension_service()->
+ DidCreateRenderViewForBackgroundPage(this);
}
}
@@ -246,7 +247,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_));
@@ -270,7 +272,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;
@@ -388,7 +390,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:
« no previous file with comments | « chrome/browser/extensions/extension_context_menu_model.cc ('k') | chrome/browser/extensions/extension_keybinding_registry.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698