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

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

Issue 196533013: Revert 256688 "Fix various issues in RedirectToFileResourceHandler." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: 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 | trunk/src/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
212 response->head.request_start = request()->creation_time(); 203 response->head.request_start = request()->creation_time();
213 response->head.response_start = TimeTicks::Now(); 204 response->head.response_start = TimeTicks::Now();
214 info->filter()->Send(new ResourceMsg_ReceivedResponse(request_id, 205 info->filter()->Send(new ResourceMsg_ReceivedResponse(request_id,
215 response->head)); 206 response->head));
216 sent_received_response_msg_ = true; 207 sent_received_response_msg_ = true;
217 208
218 if (request()->response_info().metadata.get()) { 209 if (request()->response_info().metadata.get()) {
219 std::vector<char> copy(request()->response_info().metadata->data(), 210 std::vector<char> copy(request()->response_info().metadata->data(),
220 request()->response_info().metadata->data() + 211 request()->response_info().metadata->data() +
221 request()->response_info().metadata->size()); 212 request()->response_info().metadata->size());
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
405 request()->LogUnblocked(); 396 request()->LogUnblocked();
406 controller()->Resume(); 397 controller()->Resume();
407 } 398 }
408 } 399 }
409 400
410 void AsyncResourceHandler::OnDefer() { 401 void AsyncResourceHandler::OnDefer() {
411 request()->LogBlockedBy("AsyncResourceHandler"); 402 request()->LogBlockedBy("AsyncResourceHandler");
412 } 403 }
413 404
414 } // namespace content 405 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | trunk/src/content/browser/loader/redirect_to_file_resource_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698