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

Side by Side Diff: chrome/browser/ui/auto_login_prompter.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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/ui/auto_login_info_bar_delegate.cc ('k') | chrome/browser/ui/browser.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/auto_login_prompter.h" 5 #include "chrome/browser/ui/auto_login_prompter.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/string_split.h" 10 #include "base/string_split.h"
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 new AutoLoginPrompter(web_contents, params); 171 new AutoLoginPrompter(web_contents, params);
172 } 172 }
173 173
174 void AutoLoginPrompter::Observe(int type, 174 void AutoLoginPrompter::Observe(int type,
175 const content::NotificationSource& source, 175 const content::NotificationSource& source,
176 const content::NotificationDetails& details) { 176 const content::NotificationDetails& details) {
177 if (type == content::NOTIFICATION_LOAD_STOP) { 177 if (type == content::NOTIFICATION_LOAD_STOP) {
178 InfoBarService* infobar_service = 178 InfoBarService* infobar_service =
179 InfoBarService::FromWebContents(web_contents_); 179 InfoBarService::FromWebContents(web_contents_);
180 // |infobar_service| is NULL for WebContents hosted in WebDialog. 180 // |infobar_service| is NULL for WebContents hosted in WebDialog.
181 if (infobar_service) { 181 if (infobar_service)
182 infobar_service->AddInfoBar( 182 AutoLoginInfoBarDelegate::Create(infobar_service, params_);
183 new AutoLoginInfoBarDelegate(infobar_service, params_));
184 }
185 } 183 }
186 // Either we couldn't add the infobar, we added the infobar, or the tab 184 // Either we couldn't add the infobar, we added the infobar, or the tab
187 // contents was destroyed before the navigation completed. In any case 185 // contents was destroyed before the navigation completed. In any case
188 // there's no reason to live further. 186 // there's no reason to live further.
189 delete this; 187 delete this;
190 } 188 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/auto_login_info_bar_delegate.cc ('k') | chrome/browser/ui/browser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698