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

Unified Diff: chrome/browser/host_zoom_map.h

Issue 1744003: Send content settings based on the URL to the renderer instead of just the host. (Closed)
Patch Set: nits Created 10 years, 8 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/host_content_settings_map.cc ('k') | chrome/browser/host_zoom_map.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/host_zoom_map.h
diff --git a/chrome/browser/host_zoom_map.h b/chrome/browser/host_zoom_map.h
index 87dee2ce2e2c00525bcc5aa5a7979f4b734de31e..648162c2c9c62faa41f85c12410d52c3e8f713e8 100644
--- a/chrome/browser/host_zoom_map.h
+++ b/chrome/browser/host_zoom_map.h
@@ -17,6 +17,7 @@
#include "chrome/common/notification_observer.h"
#include "chrome/common/notification_registrar.h"
+class GURL;
class PrefService;
class Profile;
@@ -27,19 +28,21 @@ class HostZoomMap : public NotificationObserver,
static void RegisterUserPrefs(PrefService* prefs);
- // Returns the zoom level for a given hostname. In most cases, there is no
- // custom zoom level, and this returns 0. Otherwise, returns the saved zoom
- // level, which may be positive (to zoom in) or negative (to zoom out).
+ // Returns the zoom level for a given url. The zoom level is determined by
+ // the host portion of the URL, or (in the absence of a host) the complete
+ // spec of the URL. In most cases, there is no custom zoom level, and this
+ // returns 0. Otherwise, returns the saved zoom level, which may be positive
+ // (to zoom in) or negative (to zoom out).
//
// This may be called on any thread.
- int GetZoomLevel(const std::string& host) const;
+ int GetZoomLevel(const GURL& url) const;
- // Sets the zoom level for a given hostname to |level|. If the level is 0,
+ // Sets the zoom level for a given url to |level|. If the level is 0,
// the host is erased from the saved preferences; otherwise the new value is
// written out.
//
// This should only be called on the UI thread.
- void SetZoomLevel(const std::string& host, int level);
+ void SetZoomLevel(const GURL& url, int level);
// Resets all zoom levels.
//
« no previous file with comments | « chrome/browser/host_content_settings_map.cc ('k') | chrome/browser/host_zoom_map.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698