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 "chrome/browser/renderer_host/render_process_host.h" | 5 #include "content/browser/renderer_host/render_process_host.h" |
6 | 6 |
7 #include "base/rand_util.h" | 7 #include "base/rand_util.h" |
8 #include "base/sys_info.h" | 8 #include "base/sys_info.h" |
9 #include "chrome/browser/child_process_security_policy.h" | 9 #include "chrome/browser/child_process_security_policy.h" |
10 #include "chrome/common/child_process_info.h" | 10 #include "chrome/common/child_process_info.h" |
11 #include "chrome/common/chrome_constants.h" | 11 #include "chrome/common/chrome_constants.h" |
12 #include "chrome/common/notification_service.h" | 12 #include "chrome/common/notification_service.h" |
13 | 13 |
14 namespace { | 14 namespace { |
15 | 15 |
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
195 | 195 |
196 // Now pick a random suitable renderer, if we have any. | 196 // Now pick a random suitable renderer, if we have any. |
197 if (!suitable_renderers.empty()) { | 197 if (!suitable_renderers.empty()) { |
198 int suitable_count = static_cast<int>(suitable_renderers.size()); | 198 int suitable_count = static_cast<int>(suitable_renderers.size()); |
199 int random_index = base::RandInt(0, suitable_count - 1); | 199 int random_index = base::RandInt(0, suitable_count - 1); |
200 return suitable_renderers[random_index]; | 200 return suitable_renderers[random_index]; |
201 } | 201 } |
202 | 202 |
203 return NULL; | 203 return NULL; |
204 } | 204 } |
OLD | NEW |