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

Unified Diff: chrome/browser/profiles/profile.cc

Issue 541103002: Introduce ChromeZoomLevelPref, make zoom level prefs independent of profile prefs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Convert to using only profile prefs. Created 6 years, 3 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/profiles/profile.cc
diff --git a/chrome/browser/profiles/profile.cc b/chrome/browser/profiles/profile.cc
index 86326aa08254a89069e62c9a11413e3bb6e9d9d3..f2e29b3d7690643dd7b2eba07f7499044bd6650d 100644
--- a/chrome/browser/profiles/profile.cc
+++ b/chrome/browser/profiles/profile.cc
@@ -60,6 +60,10 @@ TestingProfile* Profile::AsTestingProfile() {
return NULL;
}
+chrome::ChromeZoomLevelPrefs* Profile::GetZoomLevelPrefs() {
+ return NULL;
+}
+
Profile::Delegate::~Delegate() {
}
@@ -136,11 +140,27 @@ void Profile::RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry) {
prefs::kSelectFileLastDirectory,
std::string(),
user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
+ // TODO(wjmaclean): remove the following pref once migration to per-partition
+ // zoom is complete.
registry->RegisterDoublePref(
- prefs::kDefaultZoomLevel,
+ prefs::kProfileDefaultZoomLevel,
Bernhard Bauer 2014/10/01 15:09:14 This is what I meant in my email: You're registeri
wjmaclean 2014/10/01 20:32:59 I assume this comment was intended for line 151 (b
+ 0.0,
+ user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
+ std::string default_zoom_level_path(prefs::kDefaultZoomLevel);
+ default_zoom_level_path.append(".0");
+ registry->RegisterDoublePref(
+ default_zoom_level_path.c_str(),
0.0,
user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
registry->RegisterDictionaryPref(
+ prefs::kDefaultZoomLevel,
+ user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
+ // TODO(wjmaclean): remove the following pref once migration to per-partition
+ // zoom is complete.
+ registry->RegisterDictionaryPref(
+ prefs::kProfilePerHostZoomLevels,
+ user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
+ registry->RegisterDictionaryPref(
prefs::kPerHostZoomLevels,
user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
registry->RegisterStringPref(

Powered by Google App Engine
This is Rietveld 408576698