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

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

Issue 8113035: Remove RenderProcessHost::is_extension_process (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: updates Created 9 years, 2 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.h ('k') | chrome/browser/memory_details.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/extension_process_manager.cc
diff --git a/chrome/browser/extensions/extension_process_manager.cc b/chrome/browser/extensions/extension_process_manager.cc
index f31ac690a4355c3c89119404bec5390bb8de13f7..600eeebe8d9831e8fc8df589cb716e3e49c7601b 100644
--- a/chrome/browser/extensions/extension_process_manager.cc
+++ b/chrome/browser/extensions/extension_process_manager.cc
@@ -239,8 +239,8 @@ void ExtensionProcessManager::RegisterExtensionSiteInstance(
}
int site_instance_id = site_instance->id();
- int host_id = site_instance->GetProcess()->id();
- process_ids_[host_id].insert(site_instance_id);
+ int render_process_id = site_instance->GetProcess()->id();
+ process_ids_[render_process_id].insert(site_instance_id);
// Register process hosting extensions that have access to extension bindings
// with the ExtensionInfoMap on the IO thread.
@@ -254,7 +254,7 @@ void ExtensionProcessManager::RegisterExtensionSiteInstance(
BrowserThread::IO, FROM_HERE,
base::Bind(&ExtensionInfoMap::BindingsEnabledForProcess,
profile->GetExtensionInfoMap(),
- host_id));
+ render_process_id));
}
SiteInstanceIDMap::const_iterator it = extension_ids_.find(site_instance_id);
@@ -275,8 +275,8 @@ void ExtensionProcessManager::UnregisterExtensionSiteInstance(
extension_ids_.erase(it++);
}
if (site_instance->HasProcess()) {
- int host_id = site_instance->GetProcess()->id();
- ProcessIDMap::iterator host = process_ids_.find(host_id);
+ int render_process_id = site_instance->GetProcess()->id();
+ ProcessIDMap::iterator host = process_ids_.find(render_process_id);
if (host != process_ids_.end()) {
host->second.erase(site_instance_id);
if (host->second.empty()) {
@@ -287,15 +287,20 @@ void ExtensionProcessManager::UnregisterExtensionSiteInstance(
BrowserThread::IO, FROM_HERE,
base::Bind(&ExtensionInfoMap::BindingsDisabledForProcess,
profile->GetExtensionInfoMap(),
- host_id));
+ render_process_id));
}
}
}
}
-bool ExtensionProcessManager::AreBindingsEnabledForProcess(int host_id) {
- ProcessIDMap::iterator it = process_ids_.find(host_id);
- if (process_ids_.find(host_id) == process_ids_.end())
+bool ExtensionProcessManager::IsExtensionProcess(int render_process_id) {
+ return process_ids_.find(render_process_id) != process_ids_.end();
+}
+
+bool ExtensionProcessManager::AreBindingsEnabledForProcess(
+ int render_process_id) {
+ ProcessIDMap::iterator it = process_ids_.find(render_process_id);
+ if (it == process_ids_.end())
return false;
Profile* profile =
« no previous file with comments | « chrome/browser/extensions/extension_process_manager.h ('k') | chrome/browser/memory_details.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698