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

Side by Side Diff: chrome/browser/search_engines/template_url_prepopulate_data.cc

Issue 14622003: components: Move PrefRegistrySyncable into user_prefs namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixes Created 7 years, 7 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/search_engines/template_url_prepopulate_data.h" 5 #include "chrome/browser/search_engines/template_url_prepopulate_data.h"
6 6
7 #if defined(OS_POSIX) && !defined(OS_MACOSX) 7 #if defined(OS_POSIX) && !defined(OS_MACOSX)
8 #include <locale.h> 8 #include <locale.h>
9 #endif 9 #endif
10 10
(...skipping 1071 matching lines...) Expand 10 before | Expand all | Expand 10 after
1082 }; 1082 };
1083 1083
1084 const LogoURLs google_logos = { 1084 const LogoURLs google_logos = {
1085 "https://www.google.com/images/chrome_search/google_logo.png", 1085 "https://www.google.com/images/chrome_search/google_logo.png",
1086 "https://www.google.com/images/chrome_search/google_logo_2x.png", 1086 "https://www.google.com/images/chrome_search/google_logo_2x.png",
1087 }; 1087 };
1088 1088
1089 1089
1090 //////////////////////////////////////////////////////////////////////////////// 1090 ////////////////////////////////////////////////////////////////////////////////
1091 1091
1092 void RegisterUserPrefs(PrefRegistrySyncable* registry) { 1092 void RegisterUserPrefs(user_prefs::PrefRegistrySyncable* registry) {
1093 registry->RegisterIntegerPref(prefs::kCountryIDAtInstall, 1093 registry->RegisterIntegerPref(
1094 kCountryIDUnknown, 1094 prefs::kCountryIDAtInstall,
1095 PrefRegistrySyncable::UNSYNCABLE_PREF); 1095 kCountryIDUnknown,
1096 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
1096 registry->RegisterListPref(prefs::kSearchProviderOverrides, 1097 registry->RegisterListPref(prefs::kSearchProviderOverrides,
1097 PrefRegistrySyncable::UNSYNCABLE_PREF); 1098 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
1098 registry->RegisterIntegerPref(prefs::kSearchProviderOverridesVersion, 1099 registry->RegisterIntegerPref(
1099 -1, 1100 prefs::kSearchProviderOverridesVersion,
1100 PrefRegistrySyncable::UNSYNCABLE_PREF); 1101 -1,
1102 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
1101 // Obsolete pref, for migration. 1103 // Obsolete pref, for migration.
1102 registry->RegisterIntegerPref(prefs::kGeoIDAtInstall, 1104 registry->RegisterIntegerPref(
1103 -1, 1105 prefs::kGeoIDAtInstall,
1104 PrefRegistrySyncable::UNSYNCABLE_PREF); 1106 -1,
1107 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
1105 } 1108 }
1106 1109
1107 int GetDataVersion(PrefService* prefs) { 1110 int GetDataVersion(PrefService* prefs) {
1108 // Allow tests to override the local version. 1111 // Allow tests to override the local version.
1109 return (prefs && prefs->HasPrefPath(prefs::kSearchProviderOverridesVersion)) ? 1112 return (prefs && prefs->HasPrefPath(prefs::kSearchProviderOverridesVersion)) ?
1110 prefs->GetInteger(prefs::kSearchProviderOverridesVersion) : 1113 prefs->GetInteger(prefs::kSearchProviderOverridesVersion) :
1111 kCurrentDataVersion; 1114 kCurrentDataVersion;
1112 } 1115 }
1113 1116
1114 TemplateURL* MakePrepopulatedTemplateURL( 1117 TemplateURL* MakePrepopulatedTemplateURL(
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
1288 GURL GetLogoURL(const TemplateURL& template_url, LogoSize size) { 1291 GURL GetLogoURL(const TemplateURL& template_url, LogoSize size) {
1289 if (GetEngineType(template_url.url()) == SEARCH_ENGINE_GOOGLE) { 1292 if (GetEngineType(template_url.url()) == SEARCH_ENGINE_GOOGLE) {
1290 return GURL((size == LOGO_200_PERCENT) ? 1293 return GURL((size == LOGO_200_PERCENT) ?
1291 google_logos.logo_200_percent_url : 1294 google_logos.logo_200_percent_url :
1292 google_logos.logo_100_percent_url); 1295 google_logos.logo_100_percent_url);
1293 } 1296 }
1294 return GURL(); 1297 return GURL();
1295 } 1298 }
1296 1299
1297 } // namespace TemplateURLPrepopulateData 1300 } // namespace TemplateURLPrepopulateData
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698