| 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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 | 71 |
| 72 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) | 72 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) |
| 73 // Speech dispatcher is buggy, it can crash and it can make Chrome freeze. | 73 // Speech dispatcher is buggy, it can crash and it can make Chrome freeze. |
| 74 // http://crbug.com/327295 | 74 // http://crbug.com/327295 |
| 75 switches::kEnableSpeechDispatcher, | 75 switches::kEnableSpeechDispatcher, |
| 76 #endif | 76 #endif |
| 77 NULL | 77 NULL |
| 78 }; | 78 }; |
| 79 | 79 |
| 80 for (const char** flag = kBadFlags; *flag; ++flag) { | 80 for (const char** flag = kBadFlags; *flag; ++flag) { |
| 81 if (CommandLine::ForCurrentProcess()->HasSwitch(*flag)) { | 81 if (base::CommandLine::ForCurrentProcess()->HasSwitch(*flag)) { |
| 82 SimpleAlertInfoBarDelegate::Create( | 82 SimpleAlertInfoBarDelegate::Create( |
| 83 InfoBarService::FromWebContents(web_contents), | 83 InfoBarService::FromWebContents(web_contents), |
| 84 infobars::InfoBarDelegate::kNoIconID, | 84 infobars::InfoBarDelegate::kNoIconID, |
| 85 l10n_util::GetStringFUTF16(IDS_BAD_FLAGS_WARNING_MESSAGE, | 85 l10n_util::GetStringFUTF16(IDS_BAD_FLAGS_WARNING_MESSAGE, |
| 86 base::UTF8ToUTF16( | 86 base::UTF8ToUTF16( |
| 87 std::string("--") + *flag)), | 87 std::string("--") + *flag)), |
| 88 false); | 88 false); |
| 89 return; | 89 return; |
| 90 } | 90 } |
| 91 } | 91 } |
| (...skipping 25 matching lines...) Expand all Loading... |
| 117 user_data_dir.LossyDisplayName()); | 117 user_data_dir.LossyDisplayName()); |
| 118 | 118 |
| 119 if (cleanup_resource_bundle) | 119 if (cleanup_resource_bundle) |
| 120 ResourceBundle::CleanupSharedInstance(); | 120 ResourceBundle::CleanupSharedInstance(); |
| 121 | 121 |
| 122 // More complex dialogs cannot be shown before the earliest calls here. | 122 // More complex dialogs cannot be shown before the earliest calls here. |
| 123 ShowMessageBox(NULL, title, message, chrome::MESSAGE_BOX_TYPE_WARNING); | 123 ShowMessageBox(NULL, title, message, chrome::MESSAGE_BOX_TYPE_WARNING); |
| 124 } | 124 } |
| 125 | 125 |
| 126 } // namespace chrome | 126 } // namespace chrome |
| OLD | NEW |