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

Side by Side Diff: chrome/browser/google/google_url_tracker.cc

Issue 6905044: Refactor preference syncing. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix syncing of platform specific prefs Created 9 years, 8 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/google/google_url_tracker.h" 5 #include "chrome/browser/google/google_url_tracker.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 // static 123 // static
124 void GoogleURLTracker::RequestServerCheck() { 124 void GoogleURLTracker::RequestServerCheck() {
125 GoogleURLTracker* const tracker = g_browser_process->google_url_tracker(); 125 GoogleURLTracker* const tracker = g_browser_process->google_url_tracker();
126 if (tracker) 126 if (tracker)
127 tracker->SetNeedToFetch(); 127 tracker->SetNeedToFetch();
128 } 128 }
129 129
130 // static 130 // static
131 void GoogleURLTracker::RegisterPrefs(PrefService* prefs) { 131 void GoogleURLTracker::RegisterPrefs(PrefService* prefs) {
132 prefs->RegisterStringPref(prefs::kLastKnownGoogleURL, 132 prefs->RegisterStringPref(prefs::kLastKnownGoogleURL,
133 kDefaultGoogleHomepage); 133 kDefaultGoogleHomepage,
134 prefs->RegisterStringPref(prefs::kLastPromptedGoogleURL, std::string()); 134 false /* don't sync pref */);
135 prefs->RegisterStringPref(prefs::kLastPromptedGoogleURL,
136 std::string(),
137 false /* don't sync pref */);
135 } 138 }
136 139
137 // static 140 // static
138 void GoogleURLTracker::GoogleURLSearchCommitted() { 141 void GoogleURLTracker::GoogleURLSearchCommitted() {
139 GoogleURLTracker* tracker = g_browser_process->google_url_tracker(); 142 GoogleURLTracker* tracker = g_browser_process->google_url_tracker();
140 if (tracker) 143 if (tracker)
141 tracker->SearchCommitted(); 144 tracker->SearchCommitted();
142 } 145 }
143 146
144 void GoogleURLTracker::SetNeedToFetch() { 147 void GoogleURLTracker::SetNeedToFetch() {
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
355 } 358 }
356 359
357 void GoogleURLTracker::ShowGoogleURLInfoBarIfNecessary( 360 void GoogleURLTracker::ShowGoogleURLInfoBarIfNecessary(
358 TabContents* tab_contents) { 361 TabContents* tab_contents) {
359 if (!need_to_prompt_) 362 if (!need_to_prompt_)
360 return; 363 return;
361 DCHECK(!fetched_google_url_.is_empty()); 364 DCHECK(!fetched_google_url_.is_empty());
362 365
363 infobar_ = (*infobar_creator_)(tab_contents, this, fetched_google_url_); 366 infobar_ = (*infobar_creator_)(tab_contents, this, fetched_google_url_);
364 } 367 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698