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

Side by Side 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: 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/bind.h" 5 #include "base/bind.h"
6 #include "base/command_line.h" 6 #include "base/command_line.h"
7 #include "chrome/browser/extensions/extension_process_manager.h" 7 #include "chrome/browser/extensions/extension_process_manager.h"
8 8
9 #include "chrome/browser/ui/browser_window.h" 9 #include "chrome/browser/ui/browser_window.h"
10 #include "content/browser/browsing_instance.h" 10 #include "content/browser/browsing_instance.h"
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after
286 BrowserThread::PostTask( 286 BrowserThread::PostTask(
287 BrowserThread::IO, FROM_HERE, 287 BrowserThread::IO, FROM_HERE,
288 base::Bind(&ExtensionInfoMap::BindingsDisabledForProcess, 288 base::Bind(&ExtensionInfoMap::BindingsDisabledForProcess,
289 profile->GetExtensionInfoMap(), 289 profile->GetExtensionInfoMap(),
290 host_id)); 290 host_id));
291 } 291 }
292 } 292 }
293 } 293 }
294 } 294 }
295 295
296 bool ExtensionProcessManager::IsExtensionProcess(int host_id) {
297 return process_ids_.find(host_id) != process_ids_.end();
298 }
299
296 bool ExtensionProcessManager::AreBindingsEnabledForProcess(int host_id) { 300 bool ExtensionProcessManager::AreBindingsEnabledForProcess(int host_id) {
297 ProcessIDMap::iterator it = process_ids_.find(host_id); 301 ProcessIDMap::iterator it = process_ids_.find(host_id);
298 if (process_ids_.find(host_id) == process_ids_.end()) 302 if (it == process_ids_.end())
299 return false; 303 return false;
300 304
301 Profile* profile = 305 Profile* profile =
302 Profile::FromBrowserContext(browsing_instance_->browser_context()); 306 Profile::FromBrowserContext(browsing_instance_->browser_context());
303 ExtensionService* service = profile->GetExtensionService(); 307 ExtensionService* service = profile->GetExtensionService();
304 for (std::set<int>::iterator site_instance_id = it->second.begin(); 308 for (std::set<int>::iterator site_instance_id = it->second.begin();
305 site_instance_id != it->second.end(); ++site_instance_id) { 309 site_instance_id != it->second.end(); ++site_instance_id) {
306 const Extension* extension = 310 const Extension* extension =
307 GetExtensionForSiteInstance(*site_instance_id); 311 GetExtensionForSiteInstance(*site_instance_id);
308 if (extension == NULL) 312 if (extension == NULL)
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after
566 if (service && service->is_ready()) 570 if (service && service->is_ready())
567 CreateBackgroundHostsForProfileStartup(this, service->extensions()); 571 CreateBackgroundHostsForProfileStartup(this, service->extensions());
568 } 572 }
569 break; 573 break;
570 } 574 }
571 default: 575 default:
572 ExtensionProcessManager::Observe(type, source, details); 576 ExtensionProcessManager::Observe(type, source, details);
573 break; 577 break;
574 } 578 }
575 } 579 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698