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

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

Issue 808253006: Remove the GoogleURLTracker infobar functionality entirely. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Resync Created 5 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_factory.cc
diff --git a/chrome/browser/google/google_url_tracker_factory.cc b/chrome/browser/google/google_url_tracker_factory.cc
index bc6eb060b9ce1241373ab64447af2c0a1ef77b5c..1ba3e69666d75ad0dd30885b54a8e6d711494f28 100644
--- a/chrome/browser/google/google_url_tracker_factory.cc
+++ b/chrome/browser/google/google_url_tracker_factory.cc
@@ -13,6 +13,12 @@
#include "components/keyed_service/content/browser_context_dependency_manager.h"
#include "components/pref_registry/pref_registry_syncable.h"
+namespace {
+
+const char kLastPromptedGoogleURL[] = "browser.last_prompted_google_url";
+
+} // namespace
+
// static
GoogleURLTracker* GoogleURLTrackerFactory::GetForProfile(Profile* profile) {
@@ -36,6 +42,11 @@ GoogleURLTrackerFactory::~GoogleURLTrackerFactory() {
KeyedService* GoogleURLTrackerFactory::BuildServiceInstanceFor(
content::BrowserContext* context) const {
+ // Delete this now-unused pref.
+ // At some point in the future, this code can be removed entirely.
+ static_cast<Profile*>(context)->GetOriginalProfile()->GetPrefs()->ClearPref(
+ kLastPromptedGoogleURL);
+
scoped_ptr<GoogleURLTrackerClient> client(
new ChromeGoogleURLTrackerClient(Profile::FromBrowserContext(context)));
return new GoogleURLTracker(client.Pass(), GoogleURLTracker::NORMAL_MODE);
@@ -48,7 +59,7 @@ void GoogleURLTrackerFactory::RegisterProfilePrefs(
GoogleURLTracker::kDefaultGoogleHomepage,
user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
user_prefs->RegisterStringPref(
- prefs::kLastPromptedGoogleURL,
+ kLastPromptedGoogleURL,
std::string(),
user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
}

Powered by Google App Engine
This is Rietveld 408576698