Chromium Code Reviews| 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 "build/build_config.h" | 10 #include "build/build_config.h" |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 87 // if they are not. | 87 // if they are not. |
| 88 switches::kUnsafelyTreatInsecureOriginAsSecure, | 88 switches::kUnsafelyTreatInsecureOriginAsSecure, |
| 89 | 89 |
| 90 NULL | 90 NULL |
| 91 }; | 91 }; |
| 92 | 92 |
| 93 for (const char** flag = kBadFlags; *flag; ++flag) { | 93 for (const char** flag = kBadFlags; *flag; ++flag) { |
| 94 if (base::CommandLine::ForCurrentProcess()->HasSwitch(*flag)) { | 94 if (base::CommandLine::ForCurrentProcess()->HasSwitch(*flag)) { |
| 95 SimpleAlertInfoBarDelegate::Create( | 95 SimpleAlertInfoBarDelegate::Create( |
| 96 InfoBarService::FromWebContents(web_contents), | 96 InfoBarService::FromWebContents(web_contents), |
| 97 infobars::InfoBarDelegate::BAD_FLAGS_PROMPT, | 97 infobars::InfoBarDelegate::BAD_FLAGS_PROMPT, nullptr, |
|
Peter Kasting
2017/02/24 02:12:27
Similarly, seems like this should have an icon (e.
Evan Stade
2017/02/24 17:18:16
maybe but I am even less enthusiastic about this o
| |
| 98 infobars::InfoBarDelegate::kNoIconID, | |
| 99 gfx::VectorIconId::VECTOR_ICON_NONE, | |
| 100 l10n_util::GetStringFUTF16( | 98 l10n_util::GetStringFUTF16( |
| 101 IDS_BAD_FLAGS_WARNING_MESSAGE, | 99 IDS_BAD_FLAGS_WARNING_MESSAGE, |
| 102 base::UTF8ToUTF16(std::string("--") + *flag)), | 100 base::UTF8ToUTF16(std::string("--") + *flag)), |
| 103 false); | 101 false); |
| 104 return; | 102 return; |
| 105 } | 103 } |
| 106 } | 104 } |
| 107 } | 105 } |
| 108 | 106 |
| 109 void MaybeShowInvalidUserDataDirWarningDialog() { | 107 void MaybeShowInvalidUserDataDirWarningDialog() { |
| (...skipping 22 matching lines...) Expand all Loading... | |
| 132 user_data_dir.LossyDisplayName()); | 130 user_data_dir.LossyDisplayName()); |
| 133 | 131 |
| 134 if (cleanup_resource_bundle) | 132 if (cleanup_resource_bundle) |
| 135 ResourceBundle::CleanupSharedInstance(); | 133 ResourceBundle::CleanupSharedInstance(); |
| 136 | 134 |
| 137 // More complex dialogs cannot be shown before the earliest calls here. | 135 // More complex dialogs cannot be shown before the earliest calls here. |
| 138 ShowWarningMessageBox(NULL, title, message); | 136 ShowWarningMessageBox(NULL, title, message); |
| 139 } | 137 } |
| 140 | 138 |
| 141 } // namespace chrome | 139 } // namespace chrome |
| OLD | NEW |