| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 "chrome/browser/render_process_host.h" | 8 #include "chrome/browser/render_process_host.h" |
| 9 | 9 |
| 10 #include <windows.h> | 10 #include <windows.h> |
| (...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 362 policy->SetDesktop(kDesktopName); | 362 policy->SetDesktop(kDesktopName); |
| 363 } else { | 363 } else { |
| 364 DLOG(WARNING) << "Failed to apply desktop security to the renderer"; | 364 DLOG(WARNING) << "Failed to apply desktop security to the renderer"; |
| 365 } | 365 } |
| 366 | 366 |
| 367 if (!AddGenericPolicy(policy)) { | 367 if (!AddGenericPolicy(policy)) { |
| 368 NOTREACHED(); | 368 NOTREACHED(); |
| 369 return false; | 369 return false; |
| 370 } | 370 } |
| 371 | 371 |
| 372 if (!AddDllEvictionPolicy(policy)) { |
| 373 NOTREACHED(); |
| 374 return false; |
| 375 } |
| 376 |
| 372 result = broker_service->SpawnTarget(renderer_path.c_str(), | 377 result = broker_service->SpawnTarget(renderer_path.c_str(), |
| 373 cmd_line.c_str(), | 378 cmd_line.c_str(), |
| 374 policy, &target); | 379 policy, &target); |
| 375 policy->Release(); | 380 policy->Release(); |
| 376 | 381 |
| 377 if (desktop) | 382 if (desktop) |
| 378 CloseDesktop(desktop); | 383 CloseDesktop(desktop); |
| 379 | 384 |
| 380 if (sandbox::SBOX_ALL_OK != result) | 385 if (sandbox::SBOX_ALL_OK != result) |
| 381 return false; | 386 return false; |
| (...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 753 // NOTE: Sometimes it's necessary to create more render processes than | 758 // NOTE: Sometimes it's necessary to create more render processes than |
| 754 // GetMaxRendererProcessCount(), for instance when we want to create | 759 // GetMaxRendererProcessCount(), for instance when we want to create |
| 755 // a renderer process for a profile that has no existing renderers. | 760 // a renderer process for a profile that has no existing renderers. |
| 756 // This is OK in moderation, since the GetMaxRendererProcessCount() | 761 // This is OK in moderation, since the GetMaxRendererProcessCount() |
| 757 // is conservative. | 762 // is conservative. |
| 758 | 763 |
| 759 return run_renderer_in_process() || | 764 return run_renderer_in_process() || |
| 760 (renderer_process_count >= GetMaxRendererProcessCount()); | 765 (renderer_process_count >= GetMaxRendererProcessCount()); |
| 761 } | 766 } |
| 762 | 767 |
| OLD | NEW |