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

Side by Side Diff: chrome/browser/renderer_host/sync_resource_handler.cc

Issue 3455022: Revert 60378 (trying to track down http://crbug.com/56752 )- Flesh out URLLoa... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 10 years, 3 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
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 "chrome/browser/renderer_host/sync_resource_handler.h" 5 #include "chrome/browser/renderer_host/sync_resource_handler.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "chrome/browser/net/load_timing_observer.h" 8 #include "chrome/browser/net/load_timing_observer.h"
9 #include "chrome/browser/renderer_host/global_request_id.h" 9 #include "chrome/browser/renderer_host/global_request_id.h"
10 #include "chrome/common/render_messages.h" 10 #include "chrome/common/render_messages.h"
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 bool SyncResourceHandler::OnResponseStarted(int request_id, 56 bool SyncResourceHandler::OnResponseStarted(int request_id,
57 ResourceResponse* response) { 57 ResourceResponse* response) {
58 URLRequest* request = rdh_->GetURLRequest( 58 URLRequest* request = rdh_->GetURLRequest(
59 GlobalRequestID(process_id_, request_id)); 59 GlobalRequestID(process_id_, request_id));
60 LoadTimingObserver::PopulateTimingInfo(request, response); 60 LoadTimingObserver::PopulateTimingInfo(request, response);
61 61
62 // We don't care about copying the status here. 62 // We don't care about copying the status here.
63 result_.headers = response->response_head.headers; 63 result_.headers = response->response_head.headers;
64 result_.mime_type = response->response_head.mime_type; 64 result_.mime_type = response->response_head.mime_type;
65 result_.charset = response->response_head.charset; 65 result_.charset = response->response_head.charset;
66 result_.download_file_path = response->response_head.download_file_path;
67 result_.request_time = response->response_head.request_time; 66 result_.request_time = response->response_head.request_time;
68 result_.response_time = response->response_head.response_time; 67 result_.response_time = response->response_head.response_time;
69 result_.connection_id = response->response_head.connection_id; 68 result_.connection_id = response->response_head.connection_id;
70 result_.connection_reused = response->response_head.connection_reused; 69 result_.connection_reused = response->response_head.connection_reused;
71 result_.load_timing = response->response_head.load_timing; 70 result_.load_timing = response->response_head.load_timing;
72 return true; 71 return true;
73 } 72 }
74 73
75 bool SyncResourceHandler::OnWillStart(int request_id, 74 bool SyncResourceHandler::OnWillStart(int request_id,
76 const GURL& url, 75 const GURL& url,
(...skipping 29 matching lines...) Expand all
106 } 105 }
107 106
108 void SyncResourceHandler::OnRequestClosed() { 107 void SyncResourceHandler::OnRequestClosed() {
109 if (!result_message_) 108 if (!result_message_)
110 return; 109 return;
111 110
112 result_message_->set_reply_error(); 111 result_message_->set_reply_error();
113 receiver_->Send(result_message_); 112 receiver_->Send(result_message_);
114 receiver_ = NULL; // URLRequest is gone, and perhaps also the receiver. 113 receiver_ = NULL; // URLRequest is gone, and perhaps also the receiver.
115 } 114 }
OLDNEW
« no previous file with comments | « chrome/browser/renderer_host/resource_handler.h ('k') | chrome/common/render_messages_internal.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698