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

Unified Diff: chrome/browser/extensions/extension_service.cc

Issue 7464009: Removal of Profile from content part 1. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: works now Created 9 years, 5 months 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_service.cc
diff --git a/chrome/browser/extensions/extension_service.cc b/chrome/browser/extensions/extension_service.cc
index 61649ce9bcfce5afeb5bcfe8f6b80d477e329e9a..ae710e2b4bfa2f481c09fee5c1bceed453069362 100644
--- a/chrome/browser/extensions/extension_service.cc
+++ b/chrome/browser/extensions/extension_service.cc
@@ -1303,7 +1303,8 @@ void ExtensionService::NotifyExtensionLoaded(const Extension* extension) {
for (RenderProcessHost::iterator i(RenderProcessHost::AllHostsIterator());
!i.IsAtEnd(); i.Advance()) {
RenderProcessHost* host = i.GetCurrentValue();
- if (host->profile()->GetOriginalProfile() ==
+ Profile* host_profile = static_cast<Profile*>(host->context());
+ if (host_profile->GetOriginalProfile() ==
profile_->GetOriginalProfile()) {
host->Send(
new ExtensionMsg_Loaded(ExtensionMsg_Loaded_Params(extension)));
@@ -1399,10 +1400,9 @@ void ExtensionService::NotifyExtensionUnloaded(
for (RenderProcessHost::iterator i(RenderProcessHost::AllHostsIterator());
!i.IsAtEnd(); i.Advance()) {
RenderProcessHost* host = i.GetCurrentValue();
- if (host->profile()->GetOriginalProfile() ==
- profile_->GetOriginalProfile()) {
+ Profile* profile = static_cast<Profile*>(host->context());
+ if (profile->GetOriginalProfile() == profile_->GetOriginalProfile())
host->Send(new ExtensionMsg_Unloaded(extension->id()));
- }
}
profile_->UnregisterExtensionWithRequestContexts(extension->id(), reason);

Powered by Google App Engine
This is Rietveld 408576698