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

Unified Diff: chrome/browser/ui/startup/default_browser_prompt.cc

Issue 22694006: Infobar system refactor. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
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: chrome/browser/ui/startup/default_browser_prompt.cc
===================================================================
--- chrome/browser/ui/startup/default_browser_prompt.cc (revision 238220)
+++ chrome/browser/ui/startup/default_browser_prompt.cc (working copy)
@@ -13,6 +13,7 @@
#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"
@@ -58,7 +59,7 @@
// The delegate for the infobar shown when Chrome is not the default browser.
class DefaultBrowserInfoBarDelegate : public ConfirmInfoBarDelegate {
public:
- // Creates a default browser infobar delegate and adds it to
+ // Creates a default browser infobar and delegate and adds the infobar to
// |infobar_service|.
static void Create(InfoBarService* infobar_service,
PrefService* prefs,
@@ -65,8 +66,7 @@
bool interactive_flow_required);
private:
- DefaultBrowserInfoBarDelegate(InfoBarService* infobar_service,
- PrefService* prefs,
+ DefaultBrowserInfoBarDelegate(PrefService* prefs,
bool interactive_flow_required);
virtual ~DefaultBrowserInfoBarDelegate();
@@ -105,16 +105,15 @@
void DefaultBrowserInfoBarDelegate::Create(InfoBarService* infobar_service,
PrefService* prefs,
bool interactive_flow_required) {
- infobar_service->AddInfoBar(scoped_ptr<InfoBarDelegate>(
- new DefaultBrowserInfoBarDelegate(infobar_service, prefs,
- interactive_flow_required)));
+ infobar_service->AddInfoBar(ConfirmInfoBarDelegate::CreateInfoBar(
+ scoped_ptr<ConfirmInfoBarDelegate>(new DefaultBrowserInfoBarDelegate(
+ prefs, interactive_flow_required))));
}
DefaultBrowserInfoBarDelegate::DefaultBrowserInfoBarDelegate(
- InfoBarService* infobar_service,
PrefService* prefs,
bool interactive_flow_required)
- : ConfirmInfoBarDelegate(infobar_service),
+ : ConfirmInfoBarDelegate(),
prefs_(prefs),
action_taken_(false),
should_expire_(false),
« no previous file with comments | « chrome/browser/ui/startup/autolaunch_prompt_win.cc ('k') | chrome/browser/ui/startup/google_api_keys_infobar_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698