| Index: chrome/browser/ui/webui/options/content_settings_handler.cc
|
| diff --git a/chrome/browser/ui/webui/options/content_settings_handler.cc b/chrome/browser/ui/webui/options/content_settings_handler.cc
|
| index 898cf5a14936f91673116c931004a70d1d218a9a..fb02fd457f8b1235eb756a928410abfdb20218c4 100644
|
| --- a/chrome/browser/ui/webui/options/content_settings_handler.cc
|
| +++ b/chrome/browser/ui/webui/options/content_settings_handler.cc
|
| @@ -481,12 +481,15 @@ void ContentSettingsHandler::InitializeHandler() {
|
| &ContentSettingsHandler::UpdateProtectedContentExceptionsButton,
|
| base::Unretained(this)));
|
|
|
| - content::HostZoomMap* host_zoom_map =
|
| - content::HostZoomMap::GetForBrowserContext(context);
|
| + // Here we only subscribe to the HostZoomMap for the default storage partition
|
| + // since we don't allow the user to manage the zoom levels for apps.
|
| + // We're only interested in zoom-levels that are persisted, since the user
|
| + // is given the opportunity to view/delete these in the content-settings page.
|
| host_zoom_map_subscription_ =
|
| - host_zoom_map->AddZoomLevelChangedCallback(
|
| - base::Bind(&ContentSettingsHandler::OnZoomLevelChanged,
|
| - base::Unretained(this)));
|
| + content::HostZoomMap::GetDefaultForBrowserContext(context)
|
| + ->AddZoomLevelChangedCallback(
|
| + base::Bind(&ContentSettingsHandler::OnZoomLevelChanged,
|
| + base::Unretained(this)));
|
|
|
| flash_settings_manager_.reset(new PepperFlashSettingsManager(this, context));
|
| observer_.Add(Profile::FromWebUI(web_ui())->GetHostContentSettingsMap());
|
| @@ -961,7 +964,8 @@ void ContentSettingsHandler::UpdateZoomLevelsExceptionsView() {
|
| base::ListValue zoom_levels_exceptions;
|
|
|
| content::HostZoomMap* host_zoom_map =
|
| - content::HostZoomMap::GetForBrowserContext(GetBrowserContext(web_ui()));
|
| + content::HostZoomMap::GetDefaultForBrowserContext(
|
| + GetBrowserContext(web_ui()));
|
| content::HostZoomMap::ZoomLevelVector zoom_levels(
|
| host_zoom_map->GetAllZoomLevels());
|
| std::sort(zoom_levels.begin(), zoom_levels.end(), HostZoomSort);
|
| @@ -1214,7 +1218,8 @@ void ContentSettingsHandler::RemoveZoomLevelException(
|
| DCHECK(rv);
|
|
|
| content::HostZoomMap* host_zoom_map =
|
| - content::HostZoomMap::GetForBrowserContext(GetBrowserContext(web_ui()));
|
| + content::HostZoomMap::GetDefaultForBrowserContext(
|
| + GetBrowserContext(web_ui()));
|
| double default_level = host_zoom_map->GetDefaultZoomLevel();
|
| host_zoom_map->SetZoomLevelForHost(pattern, default_level);
|
| }
|
|
|