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

Unified Diff: chrome/browser/google/google_url_tracker.cc

Issue 9811022: Misc. small cleanups to minimize TemplateURL refactoring diffs: (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 9 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 128075)
+++ chrome/browser/google/google_url_tracker.cc (working copy)
@@ -39,7 +39,7 @@
namespace {
-InfoBarDelegate* CreateInfobar(InfoBarTabHelper* infobar_helper,
+InfoBarDelegate* CreateInfoBar(InfoBarTabHelper* infobar_helper,
GoogleURLTracker* google_url_tracker,
const GURL& new_google_url) {
InfoBarDelegate* infobar = new GoogleURLTrackerInfoBarDelegate(infobar_helper,
@@ -119,7 +119,7 @@
"https://www.google.com/searchdomaincheck?format=domain&type=chrome";
GoogleURLTracker::GoogleURLTracker(Mode mode)
- : infobar_creator_(&CreateInfobar),
+ : infobar_creator_(&CreateInfoBar),
google_url_(mode == UNIT_TEST_MODE ? kDefaultGoogleHomepage :
g_browser_process->local_state()->GetString(
prefs::kLastKnownGoogleURL)),
@@ -185,10 +185,9 @@
void GoogleURLTracker::AcceptGoogleURL(const GURL& new_google_url) {
google_url_ = new_google_url;
- g_browser_process->local_state()->SetString(prefs::kLastKnownGoogleURL,
- google_url_.spec());
- g_browser_process->local_state()->SetString(prefs::kLastPromptedGoogleURL,
- google_url_.spec());
+ PrefService* prefs = g_browser_process->local_state();
+ prefs->SetString(prefs::kLastKnownGoogleURL, google_url_.spec());
+ prefs->SetString(prefs::kLastPromptedGoogleURL, google_url_.spec());
content::NotificationService::current()->Notify(
chrome::NOTIFICATION_GOOGLE_URL_UPDATED,
content::NotificationService::AllSources(),
@@ -355,7 +354,7 @@
controller_ = content::Source<NavigationController>(source).ptr();
search_url_ = pending_url;
registrar_.Remove(this, content::NOTIFICATION_NAV_ENTRY_PENDING,
- content::NotificationService::AllSources());
+ content::NotificationService::AllBrowserContextsAndSources());
// Start listening for the commit notification. We also need to listen for the
// tab close command since that means the load will never commit.
registrar_.Add(this, content::NOTIFICATION_NAV_ENTRY_COMMITTED,

Powered by Google App Engine
This is Rietveld 408576698