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

Side by Side Diff: content/browser/loader/async_resource_handler.cc

Issue 82273002: Fix various issues in RedirectToFileResourceHandler. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rename test fixture Created 6 years, 9 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | content/browser/loader/redirect_to_file_resource_handler.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 193
194 if (info->GetResourceType() == ResourceType::MAIN_FRAME && host_zoom_map) { 194 if (info->GetResourceType() == ResourceType::MAIN_FRAME && host_zoom_map) {
195 const GURL& request_url = request()->url(); 195 const GURL& request_url = request()->url();
196 info->filter()->Send(new ViewMsg_SetZoomLevelForLoadingURL( 196 info->filter()->Send(new ViewMsg_SetZoomLevelForLoadingURL(
197 info->GetRouteID(), 197 info->GetRouteID(),
198 request_url, host_zoom_map->GetZoomLevelForHostAndScheme( 198 request_url, host_zoom_map->GetZoomLevelForHostAndScheme(
199 request_url.scheme(), 199 request_url.scheme(),
200 net::GetHostOrSpecFromURL(request_url)))); 200 net::GetHostOrSpecFromURL(request_url))));
201 } 201 }
202 202
203 // If the parent handler downloaded the resource to a file, grant the child
204 // read permissions on it. Note: there is similar logic in
205 // SyncResourceHandler.
206 if (!response->head.download_file_path.empty()) {
207 rdh_->RegisterDownloadedTempFile(
208 info->GetChildID(), info->GetRequestID(),
209 response->head.download_file_path);
210 }
211
203 response->head.request_start = request()->creation_time(); 212 response->head.request_start = request()->creation_time();
204 response->head.response_start = TimeTicks::Now(); 213 response->head.response_start = TimeTicks::Now();
205 info->filter()->Send(new ResourceMsg_ReceivedResponse(request_id, 214 info->filter()->Send(new ResourceMsg_ReceivedResponse(request_id,
206 response->head)); 215 response->head));
207 sent_received_response_msg_ = true; 216 sent_received_response_msg_ = true;
208 217
209 if (request()->response_info().metadata.get()) { 218 if (request()->response_info().metadata.get()) {
210 std::vector<char> copy(request()->response_info().metadata->data(), 219 std::vector<char> copy(request()->response_info().metadata->data(),
211 request()->response_info().metadata->data() + 220 request()->response_info().metadata->data() +
212 request()->response_info().metadata->size()); 221 request()->response_info().metadata->size());
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
396 request()->LogUnblocked(); 405 request()->LogUnblocked();
397 controller()->Resume(); 406 controller()->Resume();
398 } 407 }
399 } 408 }
400 409
401 void AsyncResourceHandler::OnDefer() { 410 void AsyncResourceHandler::OnDefer() {
402 request()->LogBlockedBy("AsyncResourceHandler"); 411 request()->LogBlockedBy("AsyncResourceHandler");
403 } 412 }
404 413
405 } // namespace content 414 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/browser/loader/redirect_to_file_resource_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698