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

Unified Diff: chrome/browser/ui/chrome_select_file_policy.cc

Issue 11644059: Change infobar creation to use a public static Create() method on the infobar delegate classes. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 7 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/browser.cc ('k') | chrome/browser/ui/cocoa/content_settings/collected_cookies_mac.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/chrome_select_file_policy.cc
===================================================================
--- chrome/browser/ui/chrome_select_file_policy.cc (revision 175396)
+++ chrome/browser/ui/chrome_select_file_policy.cc (working copy)
@@ -29,14 +29,9 @@
void ChromeSelectFilePolicy::SelectFileDenied() {
// Show the InfoBar saying that file-selection dialogs are disabled.
if (source_contents_) {
- InfoBarService* infobar_service =
- InfoBarService::FromWebContents(source_contents_);
- DCHECK(infobar_service);
- infobar_service->AddInfoBar(new SimpleAlertInfoBarDelegate(
- infobar_service,
- NULL,
- l10n_util::GetStringUTF16(IDS_FILE_SELECTION_DIALOG_INFOBAR),
- true));
+ SimpleAlertInfoBarDelegate::Create(
+ InfoBarService::FromWebContents(source_contents_), NULL,
+ l10n_util::GetStringUTF16(IDS_FILE_SELECTION_DIALOG_INFOBAR), true);
} else {
LOG(WARNING) << "File-selection dialogs are disabled but no WebContents "
<< "is given to display the InfoBar.";
« no previous file with comments | « chrome/browser/ui/browser.cc ('k') | chrome/browser/ui/cocoa/content_settings/collected_cookies_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698