Index: chrome/browser/ui/webui/options/browser_options_handler.cc |
diff --git a/chrome/browser/ui/webui/options/browser_options_handler.cc b/chrome/browser/ui/webui/options/browser_options_handler.cc |
index d3b772e0fcfeaee3a936c0ea55239921568252af..b4a222042826ee9e4d9f9e76f30c0933c6697290 100644 |
--- a/chrome/browser/ui/webui/options/browser_options_handler.cc |
+++ b/chrome/browser/ui/webui/options/browser_options_handler.cc |
@@ -790,6 +790,8 @@ void BrowserOptionsHandler::PageLoadStarted() { |
void BrowserOptionsHandler::InitializeHandler() { |
Profile* profile = Profile::FromWebUI(web_ui()); |
PrefService* prefs = profile->GetPrefs(); |
+ PrefService* zoom_level_prefs = profile->GetZoomLevelPrefs(); |
+ DCHECK(zoom_level_prefs); |
ProfileSyncService* sync_service( |
ProfileSyncServiceFactory::GetInstance()->GetForProfile(profile)); |
@@ -847,7 +849,8 @@ void BrowserOptionsHandler::InitializeHandler() { |
base::Bind(&BrowserOptionsHandler::SetupAutoOpenFileTypes, |
base::Unretained(this))); |
default_zoom_level_.Init( |
- prefs::kDefaultZoomLevel, prefs, |
+ prefs::kDefaultZoomLevel, |
+ zoom_level_prefs, |
base::Bind(&BrowserOptionsHandler::SetupPageZoomSelector, |
base::Unretained(this))); |
profile_pref_registrar_.Init(prefs); |
@@ -1711,8 +1714,9 @@ void BrowserOptionsHandler::SetupFontSizeSelector() { |
} |
void BrowserOptionsHandler::SetupPageZoomSelector() { |
- PrefService* pref_service = Profile::FromWebUI(web_ui())->GetPrefs(); |
- double default_zoom_level = pref_service->GetDouble(prefs::kDefaultZoomLevel); |
+ double default_zoom_level = |
+ content::HostZoomMap::GetDefaultForBrowserContext( |
+ Profile::FromWebUI(web_ui()))->GetDefaultZoomLevel(); |
double default_zoom_factor = |
content::ZoomLevelToZoomFactor(default_zoom_level); |