| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "content/browser/loader/async_resource_handler.h" | 5 #include "content/browser/loader/async_resource_handler.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 178 if (rdh_->delegate()) { | 178 if (rdh_->delegate()) { |
| 179 rdh_->delegate()->OnResponseStarted( | 179 rdh_->delegate()->OnResponseStarted( |
| 180 request(), info->GetContext(), response, info->filter()); | 180 request(), info->GetContext(), response, info->filter()); |
| 181 } | 181 } |
| 182 | 182 |
| 183 DevToolsNetLogObserver::PopulateResponseInfo(request(), response); | 183 DevToolsNetLogObserver::PopulateResponseInfo(request(), response); |
| 184 | 184 |
| 185 HostZoomMap* host_zoom_map = | 185 HostZoomMap* host_zoom_map = |
| 186 GetHostZoomMapForResourceContext(info->GetContext()); | 186 GetHostZoomMapForResourceContext(info->GetContext()); |
| 187 | 187 |
| 188 if (info->GetResourceType() == ResourceType::MAIN_FRAME && host_zoom_map) { | 188 if (info->GetResourceType() == RESOURCE_TYPE_MAIN_FRAME && host_zoom_map) { |
| 189 const GURL& request_url = request()->url(); | 189 const GURL& request_url = request()->url(); |
| 190 info->filter()->Send(new ViewMsg_SetZoomLevelForLoadingURL( | 190 info->filter()->Send(new ViewMsg_SetZoomLevelForLoadingURL( |
| 191 info->GetRouteID(), | 191 info->GetRouteID(), |
| 192 request_url, host_zoom_map->GetZoomLevelForHostAndScheme( | 192 request_url, host_zoom_map->GetZoomLevelForHostAndScheme( |
| 193 request_url.scheme(), | 193 request_url.scheme(), |
| 194 net::GetHostOrSpecFromURL(request_url)))); | 194 net::GetHostOrSpecFromURL(request_url)))); |
| 195 } | 195 } |
| 196 | 196 |
| 197 // If the parent handler downloaded the resource to a file, grant the child | 197 // If the parent handler downloaded the resource to a file, grant the child |
| 198 // read permissions on it. | 198 // read permissions on it. |
| (...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 390 request()->LogUnblocked(); | 390 request()->LogUnblocked(); |
| 391 controller()->Resume(); | 391 controller()->Resume(); |
| 392 } | 392 } |
| 393 } | 393 } |
| 394 | 394 |
| 395 void AsyncResourceHandler::OnDefer() { | 395 void AsyncResourceHandler::OnDefer() { |
| 396 request()->LogBlockedBy("AsyncResourceHandler"); | 396 request()->LogBlockedBy("AsyncResourceHandler"); |
| 397 } | 397 } |
| 398 | 398 |
| 399 } // namespace content | 399 } // namespace content |
| OLD | NEW |