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/sync_resource_handler.h" | 5 #include "content/browser/loader/sync_resource_handler.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "content/browser/loader/netlog_observer.h" | 8 #include "content/browser/loader/netlog_observer.h" |
9 #include "content/browser/loader/resource_dispatcher_host_impl.h" | 9 #include "content/browser/loader/resource_dispatcher_host_impl.h" |
10 #include "content/browser/loader/resource_message_filter.h" | 10 #include "content/browser/loader/resource_message_filter.h" |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 } | 66 } |
67 | 67 |
68 bool SyncResourceHandler::OnResponseStarted( | 68 bool SyncResourceHandler::OnResponseStarted( |
69 ResourceResponse* response, | 69 ResourceResponse* response, |
70 bool* defer) { | 70 bool* defer) { |
71 const ResourceRequestInfoImpl* info = GetRequestInfo(); | 71 const ResourceRequestInfoImpl* info = GetRequestInfo(); |
72 if (!info->filter()) | 72 if (!info->filter()) |
73 return false; | 73 return false; |
74 | 74 |
75 if (rdh_->delegate()) { | 75 if (rdh_->delegate()) { |
76 rdh_->delegate()->OnResponseStarted( | 76 rdh_->delegate()->OnResponseStarted(request(), info->GetContext(), |
77 request(), info->GetContext(), response, info->filter()); | 77 response); |
78 } | 78 } |
79 | 79 |
80 NetLogObserver::PopulateResponseInfo(request(), response); | 80 NetLogObserver::PopulateResponseInfo(request(), response); |
81 | 81 |
82 // We don't care about copying the status here. | 82 // We don't care about copying the status here. |
83 result_.headers = response->head.headers; | 83 result_.headers = response->head.headers; |
84 result_.mime_type = response->head.mime_type; | 84 result_.mime_type = response->head.mime_type; |
85 result_.charset = response->head.charset; | 85 result_.charset = response->head.charset; |
86 result_.download_file_path = response->head.download_file_path; | 86 result_.download_file_path = response->head.download_file_path; |
87 result_.request_time = response->head.request_time; | 87 result_.request_time = response->head.request_time; |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
133 result_message_ = NULL; | 133 result_message_ = NULL; |
134 return; | 134 return; |
135 } | 135 } |
136 | 136 |
137 void SyncResourceHandler::OnDataDownloaded(int bytes_downloaded) { | 137 void SyncResourceHandler::OnDataDownloaded(int bytes_downloaded) { |
138 // Sync requests don't involve ResourceMsg_DataDownloaded messages | 138 // Sync requests don't involve ResourceMsg_DataDownloaded messages |
139 // being sent back to renderers as progress is made. | 139 // being sent back to renderers as progress is made. |
140 } | 140 } |
141 | 141 |
142 } // namespace content | 142 } // namespace content |
OLD | NEW |