| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 #include "chrome/browser/ui/startup/bad_flags_prompt.h" | 5 #include "chrome/browser/ui/startup/bad_flags_prompt.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/files/file_path.h" | 8 #include "base/files/file_path.h" |
| 9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
| 10 #include "chrome/browser/infobars/infobar_service.h" | 10 #include "chrome/browser/infobars/infobar_service.h" |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 switches::kNoSandbox, | 44 switches::kNoSandbox, |
| 45 switches::kSingleProcess, | 45 switches::kSingleProcess, |
| 46 | 46 |
| 47 // These flags disable or undermine the Same Origin Policy. | 47 // These flags disable or undermine the Same Origin Policy. |
| 48 switches::kEnableBrowserPluginForAllViewTypes, | 48 switches::kEnableBrowserPluginForAllViewTypes, |
| 49 switches::kTrustedSpdyProxy, | 49 switches::kTrustedSpdyProxy, |
| 50 translate::switches::kTranslateSecurityOrigin, | 50 translate::switches::kTranslateSecurityOrigin, |
| 51 | 51 |
| 52 // These flags undermine HTTPS / connection security. | 52 // These flags undermine HTTPS / connection security. |
| 53 switches::kDisableUserMediaSecurity, | 53 switches::kDisableUserMediaSecurity, |
| 54 #if defined(ENABLE_WEBRTC) | 54 #if defined(ENABLE_WEBRTC) |
| 55 switches::kDisableWebRtcEncryption, | 55 switches::kDisableWebRtcEncryption, |
| 56 #endif | 56 #endif |
| 57 switches::kIgnoreCertificateErrors, | 57 switches::kIgnoreCertificateErrors, |
| 58 switches::kReduceSecurityForTesting, | 58 switches::kReduceSecurityForTesting, |
| 59 switches::kSyncAllowInsecureXmppConnection, | 59 switches::kSyncAllowInsecureXmppConnection, |
| 60 | 60 |
| 61 // These flags change the URLs that handle PII. | 61 // These flags change the URLs that handle PII. |
| 62 autofill::switches::kWalletSecureServiceUrl, | 62 autofill::switches::kWalletSecureServiceUrl, |
| 63 switches::kGaiaUrl, | 63 switches::kGaiaUrl, |
| 64 translate::switches::kTranslateScriptURL, | 64 translate::switches::kTranslateScriptURL, |
| 65 | 65 |
| 66 // This flag gives extensions more powers. | 66 // This flag gives extensions more powers. |
| 67 extensions::switches::kExtensionsOnChromeURLs, | 67 extensions::switches::kExtensionsOnChromeURLs, |
| 68 |
| 69 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) |
| 70 // Speech dispatcher is buggy, it can crash and it can make Chrome freeze. |
| 71 // http://crbug.com/327295 |
| 72 switches::kEnableSpeechDispatcher, |
| 73 #endif |
| 68 NULL | 74 NULL |
| 69 }; | 75 }; |
| 70 | 76 |
| 71 for (const char** flag = kBadFlags; *flag; ++flag) { | 77 for (const char** flag = kBadFlags; *flag; ++flag) { |
| 72 if (CommandLine::ForCurrentProcess()->HasSwitch(*flag)) { | 78 if (CommandLine::ForCurrentProcess()->HasSwitch(*flag)) { |
| 73 SimpleAlertInfoBarDelegate::Create( | 79 SimpleAlertInfoBarDelegate::Create( |
| 74 InfoBarService::FromWebContents(web_contents), | 80 InfoBarService::FromWebContents(web_contents), |
| 75 InfoBarDelegate::kNoIconID, | 81 InfoBarDelegate::kNoIconID, |
| 76 l10n_util::GetStringFUTF16(IDS_BAD_FLAGS_WARNING_MESSAGE, | 82 l10n_util::GetStringFUTF16(IDS_BAD_FLAGS_WARNING_MESSAGE, |
| 77 base::UTF8ToUTF16( | 83 base::UTF8ToUTF16( |
| (...skipping 29 matching lines...) Expand all Loading... |
| 107 user_data_dir.LossyDisplayName()); | 113 user_data_dir.LossyDisplayName()); |
| 108 | 114 |
| 109 if (cleanup_resource_bundle) | 115 if (cleanup_resource_bundle) |
| 110 ResourceBundle::CleanupSharedInstance(); | 116 ResourceBundle::CleanupSharedInstance(); |
| 111 | 117 |
| 112 // More complex dialogs cannot be shown before the earliest calls here. | 118 // More complex dialogs cannot be shown before the earliest calls here. |
| 113 ShowMessageBox(NULL, title, message, chrome::MESSAGE_BOX_TYPE_WARNING); | 119 ShowMessageBox(NULL, title, message, chrome::MESSAGE_BOX_TYPE_WARNING); |
| 114 } | 120 } |
| 115 | 121 |
| 116 } // namespace chrome | 122 } // namespace chrome |
| OLD | NEW |