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 // 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/renderer_host/browser_render_process_host.h" | 8 #include "chrome/browser/renderer_host/browser_render_process_host.h" |
9 | 9 |
10 #include <algorithm> | 10 #include <algorithm> |
(...skipping 595 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
606 command_line->AppendSwitchASCII(switches::kProcessType, | 606 command_line->AppendSwitchASCII(switches::kProcessType, |
607 extension_process_ ? switches::kExtensionProcess : | 607 extension_process_ ? switches::kExtensionProcess : |
608 switches::kRendererProcess); | 608 switches::kRendererProcess); |
609 | 609 |
610 if (logging::DialogsAreSuppressed()) | 610 if (logging::DialogsAreSuppressed()) |
611 command_line->AppendSwitch(switches::kNoErrorDialogs); | 611 command_line->AppendSwitch(switches::kNoErrorDialogs); |
612 | 612 |
613 if (accessibility_enabled_) | 613 if (accessibility_enabled_) |
614 command_line->AppendSwitch(switches::kEnableAccessibility); | 614 command_line->AppendSwitch(switches::kEnableAccessibility); |
615 | 615 |
616 // Now send any options from our own command line we want to propogate. | 616 // Now send any options from our own command line we want to propagate. |
617 const CommandLine& browser_command_line = *CommandLine::ForCurrentProcess(); | 617 const CommandLine& browser_command_line = *CommandLine::ForCurrentProcess(); |
618 PropagateBrowserCommandLineToRenderer(browser_command_line, command_line); | 618 PropagateBrowserCommandLineToRenderer(browser_command_line, command_line); |
619 | 619 |
620 // Pass on the browser locale. | 620 // Pass on the browser locale. |
621 const std::string locale = g_browser_process->GetApplicationLocale(); | 621 const std::string locale = g_browser_process->GetApplicationLocale(); |
622 command_line->AppendSwitchASCII(switches::kLang, locale); | 622 command_line->AppendSwitchASCII(switches::kLang, locale); |
623 | 623 |
624 // If we run base::FieldTrials, we want to pass to their state to the | 624 // If we run base::FieldTrials, we want to pass to their state to the |
625 // renderer so that it can act in accordance with each state, or record | 625 // renderer so that it can act in accordance with each state, or record |
626 // histograms relating to the base::FieldTrial states. | 626 // histograms relating to the base::FieldTrial states. |
(...skipping 680 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1307 IPC::PlatformFileForTransit file; | 1307 IPC::PlatformFileForTransit file; |
1308 #if defined(OS_POSIX) | 1308 #if defined(OS_POSIX) |
1309 file = base::FileDescriptor(model_file, false); | 1309 file = base::FileDescriptor(model_file, false); |
1310 #elif defined(OS_WIN) | 1310 #elif defined(OS_WIN) |
1311 ::DuplicateHandle(::GetCurrentProcess(), model_file, GetHandle(), &file, 0, | 1311 ::DuplicateHandle(::GetCurrentProcess(), model_file, GetHandle(), &file, 0, |
1312 false, DUPLICATE_SAME_ACCESS); | 1312 false, DUPLICATE_SAME_ACCESS); |
1313 #endif | 1313 #endif |
1314 Send(new ViewMsg_SetPhishingModel(file)); | 1314 Send(new ViewMsg_SetPhishingModel(file)); |
1315 } | 1315 } |
1316 } | 1316 } |
OLD | NEW |