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

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

Issue 7480028: Removal of Profile from content part 2. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 5ff972ebbf4e5fee041716b4f24e2fcfbad6ffec..c31e7ed2e28641b253eb46aa82f06a7b6472729a 100644
--- a/chrome/browser/extensions/extension_service.cc
+++ b/chrome/browser/extensions/extension_service.cc
@@ -1353,8 +1353,9 @@ 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_->GetOriginalProfile()) {
+ Profile* host_profile =
+ Profile::FromBrowserContext(host->browser_context());
+ if (host_profile->GetOriginalProfile() == profile_->GetOriginalProfile()) {
host->Send(
new ExtensionMsg_Loaded(ExtensionMsg_Loaded_Params(extension)));
}
@@ -1449,10 +1450,10 @@ void ExtensionService::NotifyExtensionUnloaded(
for (RenderProcessHost::iterator i(RenderProcessHost::AllHostsIterator());
!i.IsAtEnd(); i.Advance()) {
RenderProcessHost* host = i.GetCurrentValue();
- if (host->profile()->GetOriginalProfile() ==
- profile_->GetOriginalProfile()) {
+ Profile* host_profile =
+ Profile::FromBrowserContext(host->browser_context());
+ if (host_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