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

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

Issue 7058003: Take out pref watching from HostZoomMap, in preparation of removing Profile from it. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/profiles/profile.cc ('k') | chrome/chrome_tests.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/profiles/profile_impl.cc
===================================================================
--- chrome/browser/profiles/profile_impl.cc (revision 86148)
+++ chrome/browser/profiles/profile_impl.cc (working copy)
@@ -320,6 +320,7 @@
pref_change_registrar_.Add(prefs::kEnableAutoSpellCorrect, this);
pref_change_registrar_.Add(prefs::kClearSiteDataOnExit, this);
pref_change_registrar_.Add(prefs::kGoogleServicesUsername, this);
+ pref_change_registrar_.Add(prefs::kDefaultZoomLevel, this);
// It would be nice to use PathService for fetching this directory, but
// the cache directory depends on the profile directory, which isn't available
@@ -945,8 +946,11 @@
}
HostZoomMap* ProfileImpl::GetHostZoomMap() {
- if (!host_zoom_map_)
+ if (!host_zoom_map_) {
host_zoom_map_ = new HostZoomMap(this);
+ host_zoom_map_->set_default_zoom_level(
+ GetPrefs()->GetDouble(prefs::kDefaultZoomLevel));
+ }
return host_zoom_map_.get();
}
@@ -1359,6 +1363,9 @@
} else if (*pref_name_in == prefs::kGoogleServicesUsername) {
ProfileManager* profile_manager = g_browser_process->profile_manager();
profile_manager->RegisterProfileName(this);
+ } else if (*pref_name_in == prefs::kDefaultZoomLevel) {
+ GetHostZoomMap()->set_default_zoom_level(
+ prefs->GetDouble(prefs::kDefaultZoomLevel));
}
break;
}
« no previous file with comments | « chrome/browser/profiles/profile.cc ('k') | chrome/chrome_tests.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698