Web Content zoom settings should not apply to login/lock screen
Add scheme to HostZoomMap, use it to specify unmodifiable zoom level for internal ui pages.
Reason : Currently, zoom settings are remebered on a per-host basis, and ignore scheme.
It works nice for http/https access for the same host, but it is not possible to distinguish between
internal ui (with chrome:// scheme) and some intranet sites (having https://login/ does not seem unlikely).
BUG=164269
Review URL: https://chromiumcodereview.appspot.com/11866004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@187331 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index 7211c544..5583b66e 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -1905,7 +1905,8 @@
// Since zoom map is updated using rewritten URL, use rewritten URL
// to get the zoom level.
url = active_entry ? active_entry->GetURL() : GURL::EmptyGURL();
- zoom_level = zoom_map->GetZoomLevel(net::GetHostOrSpecFromURL(url));
+ zoom_level = zoom_map->GetZoomLevelForHostAndScheme(url.scheme(),
+ net::GetHostOrSpecFromURL(url));
}
return zoom_level;
}