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

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

Issue 10824030: Move ExtensionHost into extensions namespace (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Latest master for cq Created 8 years, 4 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
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 610 matching lines...) Expand 10 before | Expand all | Expand 10 after
621 // Go through all profiles to ensure we have total count of extension 621 // Go through all profiles to ensure we have total count of extension
622 // processes containing background pages, otherwise one profile can 622 // processes containing background pages, otherwise one profile can
623 // starve the other. 623 // starve the other.
624 std::vector<Profile*> profiles = g_browser_process->profile_manager()-> 624 std::vector<Profile*> profiles = g_browser_process->profile_manager()->
625 GetLoadedProfiles(); 625 GetLoadedProfiles();
626 for (size_t i = 0; i < profiles.size(); ++i) { 626 for (size_t i = 0; i < profiles.size(); ++i) {
627 ExtensionProcessManager* epm = profiles[i]->GetExtensionProcessManager(); 627 ExtensionProcessManager* epm = profiles[i]->GetExtensionProcessManager();
628 for (ExtensionProcessManager::const_iterator iter = 628 for (ExtensionProcessManager::const_iterator iter =
629 epm->background_hosts().begin(); 629 epm->background_hosts().begin();
630 iter != epm->background_hosts().end(); ++iter) { 630 iter != epm->background_hosts().end(); ++iter) {
631 ExtensionHost* host = *iter; 631 const extensions::ExtensionHost* host = *iter;
632 process_ids.insert(host->render_process_host()->GetID()); 632 process_ids.insert(host->render_process_host()->GetID());
633 } 633 }
634 } 634 }
635 635
636 if (process_ids.size() > 636 if (process_ids.size() >
637 (max_process_count * chrome::kMaxShareOfExtensionProcesses)) { 637 (max_process_count * chrome::kMaxShareOfExtensionProcesses)) {
638 return true; 638 return true;
639 } 639 }
640 640
641 return false; 641 return false;
(...skipping 1021 matching lines...) Expand 10 before | Expand all | Expand 10 after
1663 io_thread_application_locale_ = locale; 1663 io_thread_application_locale_ = locale;
1664 } 1664 }
1665 1665
1666 void ChromeContentBrowserClient::SetApplicationLocaleOnIOThread( 1666 void ChromeContentBrowserClient::SetApplicationLocaleOnIOThread(
1667 const std::string& locale) { 1667 const std::string& locale) {
1668 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); 1668 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
1669 io_thread_application_locale_ = locale; 1669 io_thread_application_locale_ = locale;
1670 } 1670 }
1671 1671
1672 } // namespace chrome 1672 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/browser/background/background_contents_service.cc ('k') | chrome/browser/chromeos/extensions/file_handler_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698