| 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/utf_string_conversions.h" | 8 #include "base/utf_string_conversions.h" |
| 9 #include "chrome/browser/infobars/infobar_service.h" | 9 #include "chrome/browser/infobars/infobar_service.h" |
| 10 #include "chrome/browser/infobars/simple_alert_infobar_delegate.h" | 10 #include "chrome/browser/infobars/simple_alert_infobar_delegate.h" |
| (...skipping 27 matching lines...) Expand all Loading... |
| 38 break; | 38 break; |
| 39 } | 39 } |
| 40 } | 40 } |
| 41 | 41 |
| 42 if (bad_flag) { | 42 if (bad_flag) { |
| 43 content::WebContents* web_contents = | 43 content::WebContents* web_contents = |
| 44 browser->tab_strip_model()->GetActiveWebContents(); | 44 browser->tab_strip_model()->GetActiveWebContents(); |
| 45 if (!web_contents) | 45 if (!web_contents) |
| 46 return; | 46 return; |
| 47 SimpleAlertInfoBarDelegate::Create( | 47 SimpleAlertInfoBarDelegate::Create( |
| 48 InfoBarService::FromWebContents(web_contents), NULL, | 48 InfoBarService::FromWebContents(web_contents), |
| 49 InfoBarDelegate::kNoIconID, |
| 49 l10n_util::GetStringFUTF16(IDS_BAD_FLAGS_WARNING_MESSAGE, | 50 l10n_util::GetStringFUTF16(IDS_BAD_FLAGS_WARNING_MESSAGE, |
| 50 UTF8ToUTF16(std::string("--") + bad_flag)), | 51 UTF8ToUTF16(std::string("--") + bad_flag)), |
| 51 false); | 52 false); |
| 52 } | 53 } |
| 53 } | 54 } |
| 54 | 55 |
| 55 } // namespace chrome | 56 } // namespace chrome |
| OLD | NEW |