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

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

Issue 7492051: Revert 94332 - 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
« no previous file with comments | « chrome/browser/extensions/extension_process_manager.cc ('k') | chrome/browser/extensions/extensions_ui.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/extension_service.cc
===================================================================
--- chrome/browser/extensions/extension_service.cc (revision 94334)
+++ chrome/browser/extensions/extension_service.cc (working copy)
@@ -1363,9 +1363,8 @@
for (RenderProcessHost::iterator i(RenderProcessHost::AllHostsIterator());
!i.IsAtEnd(); i.Advance()) {
RenderProcessHost* host = i.GetCurrentValue();
- Profile* host_profile =
- Profile::FromBrowserContext(host->browser_context());
- if (host_profile->GetOriginalProfile() == profile_->GetOriginalProfile()) {
+ if (host->profile()->GetOriginalProfile() ==
+ profile_->GetOriginalProfile()) {
host->Send(
new ExtensionMsg_Loaded(ExtensionMsg_Loaded_Params(
extension, extension->GetActivePermissions())));
@@ -1461,10 +1460,10 @@
for (RenderProcessHost::iterator i(RenderProcessHost::AllHostsIterator());
!i.IsAtEnd(); i.Advance()) {
RenderProcessHost* host = i.GetCurrentValue();
- Profile* host_profile =
- Profile::FromBrowserContext(host->browser_context());
- if (host_profile->GetOriginalProfile() == profile_->GetOriginalProfile())
+ if (host->profile()->GetOriginalProfile() ==
+ profile_->GetOriginalProfile()) {
host->Send(new ExtensionMsg_Unloaded(extension->id()));
+ }
}
profile_->UnregisterExtensionWithRequestContexts(extension->id(), reason);
« no previous file with comments | « chrome/browser/extensions/extension_process_manager.cc ('k') | chrome/browser/extensions/extensions_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698