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

Side by Side Diff: content/public/browser/render_process_host.h

Issue 9328011: Adding a command line flag to specify renderer process limit (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 10 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 #ifndef CONTENT_PUBLIC_BROWSER_RENDER_PROCESS_HOST_H_ 5 #ifndef CONTENT_PUBLIC_BROWSER_RENDER_PROCESS_HOST_H_
6 #define CONTENT_PUBLIC_BROWSER_RENDER_PROCESS_HOST_H_ 6 #define CONTENT_PUBLIC_BROWSER_RENDER_PROCESS_HOST_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/id_map.h" 9 #include "base/id_map.h"
10 #include "base/process.h" 10 #include "base/process.h"
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 // Get an existing RenderProcessHost associated with the given browser 218 // Get an existing RenderProcessHost associated with the given browser
219 // context, if possible. The renderer process is chosen randomly from 219 // context, if possible. The renderer process is chosen randomly from
220 // suitable renderers that share the same context and type (determined by the 220 // suitable renderers that share the same context and type (determined by the
221 // site url). 221 // site url).
222 // Returns NULL if no suitable renderer process is available, in which case 222 // Returns NULL if no suitable renderer process is available, in which case
223 // the caller is free to create a new renderer. 223 // the caller is free to create a new renderer.
224 static RenderProcessHost* GetExistingProcessHost( 224 static RenderProcessHost* GetExistingProcessHost(
225 content::BrowserContext* browser_context, const GURL& site_url); 225 content::BrowserContext* browser_context, const GURL& site_url);
226 226
227 // Overrides the default heuristic for limiting the max renderer process 227 // Overrides the default heuristic for limiting the max renderer process
228 // count. This is useful for unit testing process limit behaviors. 228 // count. This is useful for unit testing process limit behaviors and it is
229 // used to allow command line parameter to configure the max number of
230 // renderer processes.
Charlie Reis 2012/02/03 23:05:34 We should either guarantee that it's only called a
nasko 2012/02/07 00:42:05 Done.
229 // A value of zero means to use the default heuristic. 231 // A value of zero means to use the default heuristic.
230 static void SetMaxRendererProcessCountForTest(size_t count); 232 static void SetMaxRendererProcessCount(size_t count);
233
234 // Returns the current max number of renderer processes used by the browser.
235 static size_t GetMaxRendererProcessCount();
Charlie Reis 2012/02/03 23:05:34 This isn't strictly needed here, but I know we'll
nasko 2012/02/07 00:42:05 Done.
231 }; 236 };
232 237
233 } // namespace content. 238 } // namespace content.
234 239
235 #endif // CONTENT_PUBLIC_BROWSER_RENDER_PROCESS_HOST_H_ 240 #endif // CONTENT_PUBLIC_BROWSER_RENDER_PROCESS_HOST_H_
236 241
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698