OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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 // 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 "content/browser/renderer_host/render_process_host_impl.h" | 8 #include "content/browser/renderer_host/render_process_host_impl.h" |
9 | 9 |
10 #include <algorithm> | 10 #include <algorithm> |
(...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
396 const base::string16& sid = | 396 const base::string16& sid = |
397 GetContentClient()->browser()->GetAppContainerSidForSandboxType( | 397 GetContentClient()->browser()->GetAppContainerSidForSandboxType( |
398 GetSandboxType()); | 398 GetSandboxType()); |
399 if (!sid.empty()) | 399 if (!sid.empty()) |
400 AddAppContainerPolicy(policy, sid.c_str()); | 400 AddAppContainerPolicy(policy, sid.c_str()); |
401 | 401 |
402 return GetContentClient()->browser()->PreSpawnRenderer(policy); | 402 return GetContentClient()->browser()->PreSpawnRenderer(policy); |
403 } | 403 } |
404 | 404 |
405 #elif defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID) | 405 #elif defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID) |
406 ZygoteHandle* GetZygote() override { | 406 ZygoteHandle GetZygote() override { |
407 const base::CommandLine& browser_command_line = | 407 const base::CommandLine& browser_command_line = |
408 *base::CommandLine::ForCurrentProcess(); | 408 *base::CommandLine::ForCurrentProcess(); |
409 base::CommandLine::StringType renderer_prefix = | 409 base::CommandLine::StringType renderer_prefix = |
410 browser_command_line.GetSwitchValueNative(switches::kRendererCmdPrefix); | 410 browser_command_line.GetSwitchValueNative(switches::kRendererCmdPrefix); |
411 if (!renderer_prefix.empty()) | 411 if (!renderer_prefix.empty()) |
412 return nullptr; | 412 return nullptr; |
413 return GetGenericZygote(); | 413 return GetGenericZygote(); |
414 } | 414 } |
415 #endif // OS_WIN | 415 #endif // OS_WIN |
416 | 416 |
(...skipping 2704 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3121 LOG(ERROR) << "Terminating render process for bad Mojo message: " << error; | 3121 LOG(ERROR) << "Terminating render process for bad Mojo message: " << error; |
3122 | 3122 |
3123 // The ReceivedBadMessage call below will trigger a DumpWithoutCrashing. | 3123 // The ReceivedBadMessage call below will trigger a DumpWithoutCrashing. |
3124 // Capture the error message in a crash key value. | 3124 // Capture the error message in a crash key value. |
3125 base::debug::ScopedCrashKey error_key_value("mojo-message-error", error); | 3125 base::debug::ScopedCrashKey error_key_value("mojo-message-error", error); |
3126 bad_message::ReceivedBadMessage(render_process_id, | 3126 bad_message::ReceivedBadMessage(render_process_id, |
3127 bad_message::RPH_MOJO_PROCESS_ERROR); | 3127 bad_message::RPH_MOJO_PROCESS_ERROR); |
3128 } | 3128 } |
3129 | 3129 |
3130 } // namespace content | 3130 } // namespace content |
OLD | NEW |