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/chrome_content_browser_client.h" | 5 #include "chrome/browser/chrome_content_browser_client.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "chrome/app/breakpad_mac.h" | 8 #include "chrome/app/breakpad_mac.h" |
9 #include "chrome/browser/accessibility/browser_accessibility_state.h" | 9 #include "chrome/browser/accessibility/browser_accessibility_state.h" |
10 #include "chrome/browser/browser_process.h" | 10 #include "chrome/browser/browser_process.h" |
(...skipping 23 matching lines...) Expand all Loading... |
34 #include "chrome/browser/ssl/ssl_add_cert_handler.h" | 34 #include "chrome/browser/ssl/ssl_add_cert_handler.h" |
35 #include "chrome/browser/ssl/ssl_blocking_page.h" | 35 #include "chrome/browser/ssl/ssl_blocking_page.h" |
36 #include "chrome/browser/tab_contents/tab_contents_ssl_helper.h" | 36 #include "chrome/browser/tab_contents/tab_contents_ssl_helper.h" |
37 #include "chrome/browser/tab_contents/tab_util.h" | 37 #include "chrome/browser/tab_contents/tab_util.h" |
38 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" | 38 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" |
39 #include "chrome/browser/ui/webui/chrome_web_ui_factory.h" | 39 #include "chrome/browser/ui/webui/chrome_web_ui_factory.h" |
40 #include "chrome/common/child_process_logging.h" | 40 #include "chrome/common/child_process_logging.h" |
41 #include "chrome/common/chrome_switches.h" | 41 #include "chrome/common/chrome_switches.h" |
42 #include "chrome/common/extensions/extension.h" | 42 #include "chrome/common/extensions/extension.h" |
43 #include "chrome/common/extensions/extension_messages.h" | 43 #include "chrome/common/extensions/extension_messages.h" |
| 44 #include "chrome/common/logging_chrome.h" |
44 #include "chrome/common/pref_names.h" | 45 #include "chrome/common/pref_names.h" |
45 #include "chrome/common/render_messages.h" | 46 #include "chrome/common/render_messages.h" |
46 #include "chrome/common/url_constants.h" | 47 #include "chrome/common/url_constants.h" |
47 #include "content/browser/browsing_instance.h" | 48 #include "content/browser/browsing_instance.h" |
48 #include "content/browser/child_process_security_policy.h" | 49 #include "content/browser/child_process_security_policy.h" |
49 #include "content/browser/plugin_process_host.h" | 50 #include "content/browser/plugin_process_host.h" |
50 #include "content/browser/renderer_host/browser_render_process_host.h" | 51 #include "content/browser/renderer_host/browser_render_process_host.h" |
51 #include "content/browser/renderer_host/render_view_host.h" | 52 #include "content/browser/renderer_host/render_view_host.h" |
52 #include "content/browser/resource_context.h" | 53 #include "content/browser/resource_context.h" |
53 #include "content/browser/site_instance.h" | 54 #include "content/browser/site_instance.h" |
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
211 command_line->AppendSwitchASCII(switches::kEnableCrashReporter, | 212 command_line->AppendSwitchASCII(switches::kEnableCrashReporter, |
212 child_process_logging::GetClientId() + "," + base::GetLinuxDistro()); | 213 child_process_logging::GetClientId() + "," + base::GetLinuxDistro()); |
213 } | 214 } |
214 #elif defined(OS_MACOSX) | 215 #elif defined(OS_MACOSX) |
215 if (IsCrashReporterEnabled()) { | 216 if (IsCrashReporterEnabled()) { |
216 command_line->AppendSwitchASCII(switches::kEnableCrashReporter, | 217 command_line->AppendSwitchASCII(switches::kEnableCrashReporter, |
217 child_process_logging::GetClientId()); | 218 child_process_logging::GetClientId()); |
218 } | 219 } |
219 #endif // OS_MACOSX | 220 #endif // OS_MACOSX |
220 | 221 |
| 222 if (logging::DialogsAreSuppressed()) |
| 223 command_line->AppendSwitch(switches::kNoErrorDialogs); |
| 224 |
221 std::string process_type = | 225 std::string process_type = |
222 command_line->GetSwitchValueASCII(switches::kProcessType); | 226 command_line->GetSwitchValueASCII(switches::kProcessType); |
223 const CommandLine& browser_command_line = *CommandLine::ForCurrentProcess(); | 227 const CommandLine& browser_command_line = *CommandLine::ForCurrentProcess(); |
224 if (process_type == switches::kExtensionProcess || | 228 if (process_type == switches::kExtensionProcess || |
225 process_type == switches::kRendererProcess) { | 229 process_type == switches::kRendererProcess) { |
226 FilePath user_data_dir = | 230 FilePath user_data_dir = |
227 browser_command_line.GetSwitchValuePath(switches::kUserDataDir); | 231 browser_command_line.GetSwitchValuePath(switches::kUserDataDir); |
228 if (!user_data_dir.empty()) | 232 if (!user_data_dir.empty()) |
229 command_line->AppendSwitchPath(switches::kUserDataDir, user_data_dir); | 233 command_line->AppendSwitchPath(switches::kUserDataDir, user_data_dir); |
230 #if defined(OS_CHROMEOS) | 234 #if defined(OS_CHROMEOS) |
(...skipping 357 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
588 #if defined(USE_NSS) | 592 #if defined(USE_NSS) |
589 crypto::CryptoModuleBlockingPasswordDelegate* | 593 crypto::CryptoModuleBlockingPasswordDelegate* |
590 ChromeContentBrowserClient::GetCryptoPasswordDelegate( | 594 ChromeContentBrowserClient::GetCryptoPasswordDelegate( |
591 const GURL& url) { | 595 const GURL& url) { |
592 return browser::NewCryptoModuleBlockingDialogDelegate( | 596 return browser::NewCryptoModuleBlockingDialogDelegate( |
593 browser::kCryptoModulePasswordKeygen, url.host()); | 597 browser::kCryptoModulePasswordKeygen, url.host()); |
594 } | 598 } |
595 #endif | 599 #endif |
596 | 600 |
597 } // namespace chrome | 601 } // namespace chrome |
OLD | NEW |