| OLD | NEW |
| 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/message_loop.h" |
| 8 #include "base/rand_util.h" | 9 #include "base/rand_util.h" |
| 9 #include "base/sys_info.h" | 10 #include "base/sys_info.h" |
| 10 #include "content/browser/browser_main.h" | 11 #include "content/browser/browser_main.h" |
| 11 #include "content/browser/child_process_security_policy.h" | 12 #include "content/browser/child_process_security_policy.h" |
| 12 #include "content/browser/webui/web_ui_factory.h" | 13 #include "content/browser/webui/web_ui_factory.h" |
| 13 #include "content/common/child_process_info.h" | 14 #include "content/common/child_process_info.h" |
| 14 #include "content/public/browser/browser_thread.h" | 15 #include "content/public/browser/browser_thread.h" |
| 15 #include "content/public/browser/content_browser_client.h" | 16 #include "content/public/browser/content_browser_client.h" |
| 16 #include "content/public/browser/notification_service.h" | 17 #include "content/public/browser/notification_service.h" |
| 17 #include "content/public/browser/notification_types.h" | 18 #include "content/public/browser/notification_types.h" |
| (...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 239 | 240 |
| 240 // Now pick a random suitable renderer, if we have any. | 241 // Now pick a random suitable renderer, if we have any. |
| 241 if (!suitable_renderers.empty()) { | 242 if (!suitable_renderers.empty()) { |
| 242 int suitable_count = static_cast<int>(suitable_renderers.size()); | 243 int suitable_count = static_cast<int>(suitable_renderers.size()); |
| 243 int random_index = base::RandInt(0, suitable_count - 1); | 244 int random_index = base::RandInt(0, suitable_count - 1); |
| 244 return suitable_renderers[random_index]; | 245 return suitable_renderers[random_index]; |
| 245 } | 246 } |
| 246 | 247 |
| 247 return NULL; | 248 return NULL; |
| 248 } | 249 } |
| OLD | NEW |