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

Unified Diff: chrome/browser/ui/webui/options/content_settings_handler.cc

Issue 393133002: Migrate HostZoomMap to live in StoragePartition. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments; patch for landing. Created 6 years, 1 month 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/ui/views/toolbar/wrench_menu.cc ('k') | chrome/browser/ui/zoom/chrome_zoom_level_prefs.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 b4ef36bcd2e0cb4afba60f06c32305fac8321956..b073fb36b37572f9009e795664a66aeaa48506b3 100644
--- a/chrome/browser/ui/webui/options/content_settings_handler.cc
+++ b/chrome/browser/ui/webui/options/content_settings_handler.cc
@@ -490,12 +490,15 @@ void ContentSettingsHandler::InitializeHandler() {
&ContentSettingsHandler::UpdateProtectedContentExceptionsButton,
base::Unretained(this)));
- content::HostZoomMap* host_zoom_map =
- content::HostZoomMap::GetDefaultForBrowserContext(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));
« no previous file with comments | « chrome/browser/ui/views/toolbar/wrench_menu.cc ('k') | chrome/browser/ui/zoom/chrome_zoom_level_prefs.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698