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

Unified Diff: chrome/browser/google/google_url_tracker.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
Index: chrome/browser/google/google_url_tracker.cc
===================================================================
--- chrome/browser/google/google_url_tracker.cc (revision 175396)
+++ chrome/browser/google/google_url_tracker.cc (working copy)
@@ -26,24 +26,6 @@
#include "net/url_request/url_request_status.h"
-namespace {
-
-GoogleURLTrackerInfoBarDelegate* CreateInfoBar(
- InfoBarService* infobar_service,
- GoogleURLTracker* google_url_tracker,
- const GURL& search_url) {
- GoogleURLTrackerInfoBarDelegate* infobar =
- new GoogleURLTrackerInfoBarDelegate(infobar_service, google_url_tracker,
- search_url);
- // AddInfoBar() takes ownership; it will delete |infobar| if it fails.
- return infobar_service->AddInfoBar(infobar) ? infobar : NULL;
-}
-
-} // namespace
-
-
-// GoogleURLTracker -----------------------------------------------------------
-
const char GoogleURLTracker::kDefaultGoogleHomepage[] =
"http://www.google.com/";
const char GoogleURLTracker::kSearchDomainCheckURL[] =
@@ -51,7 +33,7 @@
GoogleURLTracker::GoogleURLTracker(Profile* profile, Mode mode)
: profile_(profile),
- infobar_creator_(base::Bind(&CreateInfoBar)),
+ infobar_creator_(base::Bind(&GoogleURLTrackerInfoBarDelegate::Create)),
google_url_(mode == UNIT_TEST_MODE ? kDefaultGoogleHomepage :
profile->GetPrefs()->GetString(prefs::kLastKnownGoogleURL)),
ALLOW_THIS_IN_INITIALIZER_LIST(weak_ptr_factory_(this)),

Powered by Google App Engine
This is Rietveld 408576698