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

Unified Diff: content/browser/loader/async_resource_handler.cc

Issue 809223006: Check temporary zoom status when sending zoom level in navigation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Revise as per comments. Created 5 years, 10 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
Index: content/browser/loader/async_resource_handler.cc
diff --git a/content/browser/loader/async_resource_handler.cc b/content/browser/loader/async_resource_handler.cc
index 51b0a744dc9b7f013c89f2f9b0d998553432581c..cbf6aea3657a87a85b9f71aaf1abaa15932bfe41 100644
--- a/content/browser/loader/async_resource_handler.cc
+++ b/content/browser/loader/async_resource_handler.cc
@@ -193,15 +193,21 @@ bool AsyncResourceHandler::OnResponseStarted(ResourceResponse* response,
DevToolsNetLogObserver::PopulateResponseInfo(request(), response);
- const HostZoomMap* host_zoom_map = info->filter()->GetHostZoomMap();
+ const HostZoomMapImpl* host_zoom_map =
+ static_cast<const HostZoomMapImpl*>(info->filter()->GetHostZoomMap());
if (info->GetResourceType() == RESOURCE_TYPE_MAIN_FRAME && host_zoom_map) {
const GURL& request_url = request()->url();
+ int render_process_id = info->GetChildID();
+ int render_view_id = info->GetRouteID();
+
+ // TODO(wjmaclean): verify that using the full request url (without passing
+ // an empty scheme as we used to) doesn't break anything.
Charlie Reis 2015/02/11 20:56:34 This doesn't instill confidence. :) Can we test
wjmaclean 2015/02/12 15:59:36 Gah, just realized we're not changing anything! *M
+ double zoom_level = host_zoom_map->GetZoomLevelForView(
+ request_url, render_process_id, render_view_id);
+
info->filter()->Send(new ViewMsg_SetZoomLevelForLoadingURL(
- info->GetRouteID(),
- request_url, host_zoom_map->GetZoomLevelForHostAndScheme(
- request_url.scheme(),
- net::GetHostOrSpecFromURL(request_url))));
+ render_view_id, request_url, zoom_level));
}
// If the parent handler downloaded the resource to a file, grant the child
« content/browser/host_zoom_map_impl.h ('K') | « content/browser/host_zoom_map_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698