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 1277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1288 gpu_data_manager->AppendRendererCommandLine(command_line); | 1288 gpu_data_manager->AppendRendererCommandLine(command_line); |
1289 } | 1289 } |
1290 | 1290 |
1291 void RenderProcessHostImpl::AppendRendererCommandLine( | 1291 void RenderProcessHostImpl::AppendRendererCommandLine( |
1292 base::CommandLine* command_line) const { | 1292 base::CommandLine* command_line) const { |
1293 // Pass the process type first, so it shows first in process listings. | 1293 // Pass the process type first, so it shows first in process listings. |
1294 command_line->AppendSwitchASCII(switches::kProcessType, | 1294 command_line->AppendSwitchASCII(switches::kProcessType, |
1295 switches::kRendererProcess); | 1295 switches::kRendererProcess); |
1296 | 1296 |
1297 #if defined(OS_WIN) | 1297 #if defined(OS_WIN) |
1298 if (GetContentClient()->browser()->ShouldUseWindowsPrefetchArgument()) | 1298 command_line->AppendArg(switches::kPrefetchArgumentRenderer); |
1299 command_line->AppendArg(switches::kPrefetchArgumentRenderer); | |
1300 #endif // defined(OS_WIN) | 1299 #endif // defined(OS_WIN) |
1301 | 1300 |
1302 // Now send any options from our own command line we want to propagate. | 1301 // Now send any options from our own command line we want to propagate. |
1303 const base::CommandLine& browser_command_line = | 1302 const base::CommandLine& browser_command_line = |
1304 *base::CommandLine::ForCurrentProcess(); | 1303 *base::CommandLine::ForCurrentProcess(); |
1305 PropagateBrowserCommandLineToRenderer(browser_command_line, command_line); | 1304 PropagateBrowserCommandLineToRenderer(browser_command_line, command_line); |
1306 | 1305 |
1307 // Pass on the browser locale. | 1306 // Pass on the browser locale. |
1308 const std::string locale = | 1307 const std::string locale = |
1309 GetContentClient()->browser()->GetApplicationLocale(); | 1308 GetContentClient()->browser()->GetApplicationLocale(); |
(...skipping 1501 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2811 LOG(ERROR) << "Terminating render process for bad Mojo message: " << error; | 2810 LOG(ERROR) << "Terminating render process for bad Mojo message: " << error; |
2812 | 2811 |
2813 // The ReceivedBadMessage call below will trigger a DumpWithoutCrashing. Alias | 2812 // The ReceivedBadMessage call below will trigger a DumpWithoutCrashing. Alias |
2814 // enough information here so that we can determine what the bad message was. | 2813 // enough information here so that we can determine what the bad message was. |
2815 base::debug::Alias(&error); | 2814 base::debug::Alias(&error); |
2816 bad_message::ReceivedBadMessage(process.get(), | 2815 bad_message::ReceivedBadMessage(process.get(), |
2817 bad_message::RPH_MOJO_PROCESS_ERROR); | 2816 bad_message::RPH_MOJO_PROCESS_ERROR); |
2818 } | 2817 } |
2819 | 2818 |
2820 } // namespace content | 2819 } // namespace content |
OLD | NEW |