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

Unified Diff: trunk/src/chrome/browser/ui/apps/app_metro_infobar_delegate_win.cc

Issue 102163002: Revert 238283 "Infobar system refactor." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 years 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
Index: trunk/src/chrome/browser/ui/apps/app_metro_infobar_delegate_win.cc
===================================================================
--- trunk/src/chrome/browser/ui/apps/app_metro_infobar_delegate_win.cc (revision 238401)
+++ trunk/src/chrome/browser/ui/apps/app_metro_infobar_delegate_win.cc (working copy)
@@ -9,8 +9,6 @@
#include "base/prefs/pref_service.h"
#include "chrome/browser/apps/app_launch_for_metro_restart_win.h"
#include "chrome/browser/browser_process.h"
-#include "chrome/browser/infobars/infobar.h"
-#include "chrome/browser/infobars/infobar_service.h"
#include "chrome/browser/lifetime/application_lifetime.h"
#include "chrome/browser/metro_utils/metro_chrome_win.h"
#include "chrome/browser/profiles/profile.h"
@@ -45,9 +43,10 @@
content::Referrer(), NEW_FOREGROUND_TAB, content::PAGE_TRANSITION_LINK,
false);
content::WebContents* web_contents = displayer.browser()->OpenURL(params);
- InfoBarService::FromWebContents(web_contents)->AddInfoBar(
- ConfirmInfoBarDelegate::CreateInfoBar(scoped_ptr<ConfirmInfoBarDelegate>(
- new AppMetroInfoBarDelegateWin(mode, extension_id))));
+ InfoBarService* info_bar_service =
+ InfoBarService::FromWebContents(web_contents);
+ info_bar_service->AddInfoBar(scoped_ptr<InfoBarDelegate>(
+ new AppMetroInfoBarDelegateWin(info_bar_service, mode, extension_id)));
// Use PostTask because we can get here in a COM SendMessage, and
// ActivateApplication can not be sent nested (returns error
@@ -57,9 +56,10 @@
}
AppMetroInfoBarDelegateWin::AppMetroInfoBarDelegateWin(
+ InfoBarService* info_bar_service,
Mode mode,
const std::string& extension_id)
- : ConfirmInfoBarDelegate(),
+ : ConfirmInfoBarDelegate(info_bar_service),
mode_(mode),
extension_id_(extension_id) {
DCHECK_EQ(mode_ == SHOW_APP_LIST, extension_id_.empty());

Powered by Google App Engine
This is Rietveld 408576698