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

Unified Diff: trunk/src/chrome/browser/ui/startup/default_browser_prompt.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/startup/default_browser_prompt.cc
===================================================================
--- trunk/src/chrome/browser/ui/startup/default_browser_prompt.cc (revision 238401)
+++ trunk/src/chrome/browser/ui/startup/default_browser_prompt.cc (working copy)
@@ -13,7 +13,6 @@
#include "chrome/browser/browser_process.h"
#include "chrome/browser/first_run/first_run.h"
#include "chrome/browser/infobars/confirm_infobar_delegate.h"
-#include "chrome/browser/infobars/infobar.h"
#include "chrome/browser/infobars/infobar_service.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/shell_integration.h"
@@ -59,14 +58,15 @@
// The delegate for the infobar shown when Chrome is not the default browser.
class DefaultBrowserInfoBarDelegate : public ConfirmInfoBarDelegate {
public:
- // Creates a default browser infobar and delegate and adds the infobar to
+ // Creates a default browser infobar delegate and adds it to
// |infobar_service|.
static void Create(InfoBarService* infobar_service,
PrefService* prefs,
bool interactive_flow_required);
private:
- DefaultBrowserInfoBarDelegate(PrefService* prefs,
+ DefaultBrowserInfoBarDelegate(InfoBarService* infobar_service,
+ PrefService* prefs,
bool interactive_flow_required);
virtual ~DefaultBrowserInfoBarDelegate();
@@ -105,15 +105,16 @@
void DefaultBrowserInfoBarDelegate::Create(InfoBarService* infobar_service,
PrefService* prefs,
bool interactive_flow_required) {
- infobar_service->AddInfoBar(ConfirmInfoBarDelegate::CreateInfoBar(
- scoped_ptr<ConfirmInfoBarDelegate>(new DefaultBrowserInfoBarDelegate(
- prefs, interactive_flow_required))));
+ infobar_service->AddInfoBar(scoped_ptr<InfoBarDelegate>(
+ new DefaultBrowserInfoBarDelegate(infobar_service, prefs,
+ interactive_flow_required)));
}
DefaultBrowserInfoBarDelegate::DefaultBrowserInfoBarDelegate(
+ InfoBarService* infobar_service,
PrefService* prefs,
bool interactive_flow_required)
- : ConfirmInfoBarDelegate(),
+ : ConfirmInfoBarDelegate(infobar_service),
prefs_(prefs),
action_taken_(false),
should_expire_(false),

Powered by Google App Engine
This is Rietveld 408576698