Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(248)

Side by Side Diff: chrome/browser/ui/startup/bad_flags_prompt.cc

Issue 240193003: Move Infobars core files to the Infobars component (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix nib name on mac Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 // http://crbug.com/327295 73 // http://crbug.com/327295
74 switches::kEnableSpeechDispatcher, 74 switches::kEnableSpeechDispatcher,
75 #endif 75 #endif
76 NULL 76 NULL
77 }; 77 };
78 78
79 for (const char** flag = kBadFlags; *flag; ++flag) { 79 for (const char** flag = kBadFlags; *flag; ++flag) {
80 if (CommandLine::ForCurrentProcess()->HasSwitch(*flag)) { 80 if (CommandLine::ForCurrentProcess()->HasSwitch(*flag)) {
81 SimpleAlertInfoBarDelegate::Create( 81 SimpleAlertInfoBarDelegate::Create(
82 InfoBarService::FromWebContents(web_contents), 82 InfoBarService::FromWebContents(web_contents),
83 InfoBarDelegate::kNoIconID, 83 infobars::InfoBarDelegate::kNoIconID,
84 l10n_util::GetStringFUTF16(IDS_BAD_FLAGS_WARNING_MESSAGE, 84 l10n_util::GetStringFUTF16(IDS_BAD_FLAGS_WARNING_MESSAGE,
85 base::UTF8ToUTF16( 85 base::UTF8ToUTF16(
86 std::string("--") + *flag)), 86 std::string("--") + *flag)),
87 false); 87 false);
88 return; 88 return;
89 } 89 }
90 } 90 }
91 } 91 }
92 92
93 void MaybeShowInvalidUserDataDirWarningDialog() { 93 void MaybeShowInvalidUserDataDirWarningDialog() {
(...skipping 21 matching lines...) Expand all
115 user_data_dir.LossyDisplayName()); 115 user_data_dir.LossyDisplayName());
116 116
117 if (cleanup_resource_bundle) 117 if (cleanup_resource_bundle)
118 ResourceBundle::CleanupSharedInstance(); 118 ResourceBundle::CleanupSharedInstance();
119 119
120 // More complex dialogs cannot be shown before the earliest calls here. 120 // More complex dialogs cannot be shown before the earliest calls here.
121 ShowMessageBox(NULL, title, message, chrome::MESSAGE_BOX_TYPE_WARNING); 121 ShowMessageBox(NULL, title, message, chrome::MESSAGE_BOX_TYPE_WARNING);
122 } 122 }
123 123
124 } // namespace chrome 124 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/browser/ui/startup/autolaunch_prompt_win.cc ('k') | chrome/browser/ui/startup/default_browser_prompt.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698