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

Side by Side Diff: content/browser/renderer_host/render_process_host_impl.cc

Issue 16599016: Add UMA stats for predicted process counts with out-of-process iframes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Update hash_tables.h include Created 7 years, 6 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 // Represents the browser side of the browser <--> renderer communication 5 // Represents the browser side of the browser <--> renderer communication
6 // channel. There will be one RenderProcessHost per renderer process. 6 // channel. There will be one RenderProcessHost per renderer process.
7 7
8 #include "content/browser/renderer_host/render_process_host_impl.h" 8 #include "content/browser/renderer_host/render_process_host_impl.h"
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 1502 matching lines...) Expand 10 before | Expand all | Expand 10 after
1513 if (!suitable_renderers.empty()) { 1513 if (!suitable_renderers.empty()) {
1514 int suitable_count = static_cast<int>(suitable_renderers.size()); 1514 int suitable_count = static_cast<int>(suitable_renderers.size());
1515 int random_index = base::RandInt(0, suitable_count - 1); 1515 int random_index = base::RandInt(0, suitable_count - 1);
1516 return suitable_renderers[random_index]; 1516 return suitable_renderers[random_index];
1517 } 1517 }
1518 1518
1519 return NULL; 1519 return NULL;
1520 } 1520 }
1521 1521
1522 // static 1522 // static
1523 bool RenderProcessHostImpl::ShouldUseProcessPerSite( 1523 bool RenderProcessHost::ShouldUseProcessPerSite(
1524 BrowserContext* browser_context, 1524 BrowserContext* browser_context,
1525 const GURL& url) { 1525 const GURL& url) {
1526 // Returns true if we should use the process-per-site model. This will be 1526 // Returns true if we should use the process-per-site model. This will be
1527 // the case if the --process-per-site switch is specified, or in 1527 // the case if the --process-per-site switch is specified, or in
1528 // process-per-site-instance for particular sites (e.g., WebUI). 1528 // process-per-site-instance for particular sites (e.g., WebUI).
1529 1529
1530 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); 1530 const CommandLine& command_line = *CommandLine::ForCurrentProcess();
1531 if (command_line.HasSwitch(switches::kProcessPerSite)) 1531 if (command_line.HasSwitch(switches::kProcessPerSite))
1532 return true; 1532 return true;
1533 1533
(...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after
1798 continue; 1798 continue;
1799 1799
1800 RenderViewHost* rvh = 1800 RenderViewHost* rvh =
1801 RenderViewHost::From(const_cast<RenderWidgetHost*>(widget)); 1801 RenderViewHost::From(const_cast<RenderWidgetHost*>(widget));
1802 1802
1803 rvh->UpdateWebkitPreferences(rvh->GetWebkitPreferences()); 1803 rvh->UpdateWebkitPreferences(rvh->GetWebkitPreferences());
1804 } 1804 }
1805 } 1805 }
1806 1806
1807 } // namespace content 1807 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_process_host_impl.h ('k') | content/browser/site_instance_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698