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

Side by Side Diff: content/browser/renderer_host/render_process_host.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 "content/browser/renderer_host/render_process_host.h" 5 #include "content/browser/renderer_host/render_process_host.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/rand_util.h" 8 #include "base/rand_util.h"
9 #include "base/sys_info.h" 9 #include "base/sys_info.h"
10 #include "content/browser/browser_thread.h" 10 #include "content/browser/browser_thread.h"
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 88
89 // static 89 // static
90 void RenderProcessHost::SetMaxRendererProcessCount(size_t count) { 90 void RenderProcessHost::SetMaxRendererProcessCount(size_t count) {
91 max_renderer_count_override = count; 91 max_renderer_count_override = count;
92 } 92 }
93 93
94 RenderProcessHost::RenderProcessHost(content::BrowserContext* browser_context) 94 RenderProcessHost::RenderProcessHost(content::BrowserContext* browser_context)
95 : max_page_id_(-1), 95 : max_page_id_(-1),
96 fast_shutdown_started_(false), 96 fast_shutdown_started_(false),
97 deleting_soon_(false), 97 deleting_soon_(false),
98 is_extension_process_(false),
99 pending_views_(0), 98 pending_views_(0),
100 id_(ChildProcessInfo::GenerateChildProcessUniqueId()), 99 id_(ChildProcessInfo::GenerateChildProcessUniqueId()),
101 browser_context_(browser_context), 100 browser_context_(browser_context),
102 sudden_termination_allowed_(true), 101 sudden_termination_allowed_(true),
103 ignore_input_events_(false) { 102 ignore_input_events_(false) {
104 all_hosts.AddWithID(this, id()); 103 all_hosts.AddWithID(this, id());
105 all_hosts.set_check_on_null_data(true); 104 all_hosts.set_check_on_null_data(true);
106 // Initialize |child_process_activity_time_| to a reasonable value. 105 // Initialize |child_process_activity_time_| to a reasonable value.
107 mark_child_process_activity_time(); 106 mark_child_process_activity_time();
108 } 107 }
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 234
236 // Now pick a random suitable renderer, if we have any. 235 // Now pick a random suitable renderer, if we have any.
237 if (!suitable_renderers.empty()) { 236 if (!suitable_renderers.empty()) {
238 int suitable_count = static_cast<int>(suitable_renderers.size()); 237 int suitable_count = static_cast<int>(suitable_renderers.size());
239 int random_index = base::RandInt(0, suitable_count - 1); 238 int random_index = base::RandInt(0, suitable_count - 1);
240 return suitable_renderers[random_index]; 239 return suitable_renderers[random_index];
241 } 240 }
242 241
243 return NULL; 242 return NULL;
244 } 243 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698