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

Side by Side Diff: chrome/browser/chrome_content_browser_client.cc

Issue 10116017: Remove EPM::all_hosts_ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: cleanup Created 8 years, 8 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "chrome/browser/chrome_content_browser_client.h" 5 #include "chrome/browser/chrome_content_browser_client.h"
6 6
7 #include <set> 7 #include <set>
8 #include <utility> 8 #include <utility>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 577 matching lines...) Expand 10 before | Expand all | Expand 10 after
588 size_t max_process_count = 588 size_t max_process_count =
589 content::RenderProcessHost::GetMaxRendererProcessCount(); 589 content::RenderProcessHost::GetMaxRendererProcessCount();
590 590
591 // Go through all profiles to ensure we have total count of extension 591 // Go through all profiles to ensure we have total count of extension
592 // processes containing background pages, otherwise one profile can 592 // processes containing background pages, otherwise one profile can
593 // starve the other. 593 // starve the other.
594 std::vector<Profile*> profiles = g_browser_process->profile_manager()-> 594 std::vector<Profile*> profiles = g_browser_process->profile_manager()->
595 GetLoadedProfiles(); 595 GetLoadedProfiles();
596 for (size_t i = 0; i < profiles.size(); ++i) { 596 for (size_t i = 0; i < profiles.size(); ++i) {
597 ExtensionProcessManager* epm = profiles[i]->GetExtensionProcessManager(); 597 ExtensionProcessManager* epm = profiles[i]->GetExtensionProcessManager();
598 for (ExtensionProcessManager::const_iterator iter = epm->begin(); 598 for (ExtensionProcessManager::const_iterator iter =
599 iter != epm->end(); 599 epm->background_hosts().begin();
600 ++iter) { 600 iter != epm->background_hosts().end(); ++iter) {
601 ExtensionHost* host = *iter; 601 ExtensionHost* host = *iter;
602 if (host->extension()->has_background_page()) { 602 process_ids.insert(host->render_process_host()->GetID());
603 process_ids.insert(host->render_process_host()->GetID());
604 }
605 } 603 }
606 } 604 }
607 605
608 if (process_ids.size() > 606 if (process_ids.size() >
609 (max_process_count * chrome::kMaxShareOfExtensionProcesses)) { 607 (max_process_count * chrome::kMaxShareOfExtensionProcesses)) {
610 return true; 608 return true;
611 } 609 }
612 610
613 return false; 611 return false;
614 } 612 }
(...skipping 1030 matching lines...) Expand 10 before | Expand all | Expand 10 after
1645 #if defined(USE_NSS) 1643 #if defined(USE_NSS)
1646 crypto::CryptoModuleBlockingPasswordDelegate* 1644 crypto::CryptoModuleBlockingPasswordDelegate*
1647 ChromeContentBrowserClient::GetCryptoPasswordDelegate( 1645 ChromeContentBrowserClient::GetCryptoPasswordDelegate(
1648 const GURL& url) { 1646 const GURL& url) {
1649 return browser::NewCryptoModuleBlockingDialogDelegate( 1647 return browser::NewCryptoModuleBlockingDialogDelegate(
1650 browser::kCryptoModulePasswordKeygen, url.host()); 1648 browser::kCryptoModulePasswordKeygen, url.host());
1651 } 1649 }
1652 #endif 1650 #endif
1653 1651
1654 } // namespace chrome 1652 } // namespace chrome
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698