summaryrefslogtreecommitdiffstats
path: root/chrome/browser/extensions/extension_service.cc
diff options
context:
space:
mode:
authorsergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-07-27 19:29:56 +0000
committersergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-07-27 19:29:56 +0000
commit74d32ec47f9098ae52997b159cf05342020d72a9 (patch)
tree1a2b178feceea57e0e15250cc7c5fc44114fe436 /chrome/browser/extensions/extension_service.cc
parent331bf1416770ae1a2b3649369b596f6f5511bd72 (diff)
downloadchromium_src-74d32ec47f9098ae52997b159cf05342020d72a9.zip
chromium_src-74d32ec47f9098ae52997b159cf05342020d72a9.tar.gz
chromium_src-74d32ec47f9098ae52997b159cf05342020d72a9.tar.bz2
Revert 94332 - Removal of Profile from content part 2.
BUG=76788 TEST=no change visible Review URL: http://codereview.chromium.org/7480028 TBR=avi@chromium.org Review URL: http://codereview.chromium.org/7492051 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@94335 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/extensions/extension_service.cc')
-rw-r--r--chrome/browser/extensions/extension_service.cc11
1 files changed, 5 insertions, 6 deletions
diff --git a/chrome/browser/extensions/extension_service.cc b/chrome/browser/extensions/extension_service.cc
index ffb87e06..72667a1 100644
--- a/chrome/browser/extensions/extension_service.cc
+++ b/chrome/browser/extensions/extension_service.cc
@@ -1363,9 +1363,8 @@ void ExtensionService::NotifyExtensionLoaded(const Extension* extension) {
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 @@ void ExtensionService::NotifyExtensionUnloaded(
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);