| 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/devtools/devtools_netlog_observer.h" | 8 #include "content/browser/devtools/devtools_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 23 matching lines...) Expand all Loading... |
| 34 if (result_message_) { | 34 if (result_message_) { |
| 35 result_message_->set_reply_error(); | 35 result_message_->set_reply_error(); |
| 36 ResourceMessageFilter* filter = GetFilter(); | 36 ResourceMessageFilter* filter = GetFilter(); |
| 37 // If the filter doesn't exist at this point, the process has died and isn't | 37 // If the filter doesn't exist at this point, the process has died and isn't |
| 38 // waiting for the result message anymore. | 38 // waiting for the result message anymore. |
| 39 if (filter) | 39 if (filter) |
| 40 filter->Send(result_message_); | 40 filter->Send(result_message_); |
| 41 } | 41 } |
| 42 } | 42 } |
| 43 | 43 |
| 44 bool SyncResourceHandler::OnUploadProgress(uint64 position, uint64 size) { | |
| 45 return true; | |
| 46 } | |
| 47 | |
| 48 bool SyncResourceHandler::OnRequestRedirected( | 44 bool SyncResourceHandler::OnRequestRedirected( |
| 49 const net::RedirectInfo& redirect_info, | 45 const net::RedirectInfo& redirect_info, |
| 50 ResourceResponse* response, | 46 ResourceResponse* response, |
| 51 bool* defer) { | 47 bool* defer) { |
| 52 if (rdh_->delegate()) { | 48 if (rdh_->delegate()) { |
| 53 rdh_->delegate()->OnRequestRedirected( | 49 rdh_->delegate()->OnRequestRedirected( |
| 54 redirect_info.new_url, request(), GetRequestInfo()->GetContext(), | 50 redirect_info.new_url, request(), GetRequestInfo()->GetContext(), |
| 55 response); | 51 response); |
| 56 } | 52 } |
| 57 | 53 |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 137 result_message_ = NULL; | 133 result_message_ = NULL; |
| 138 return; | 134 return; |
| 139 } | 135 } |
| 140 | 136 |
| 141 void SyncResourceHandler::OnDataDownloaded(int bytes_downloaded) { | 137 void SyncResourceHandler::OnDataDownloaded(int bytes_downloaded) { |
| 142 // Sync requests don't involve ResourceMsg_DataDownloaded messages | 138 // Sync requests don't involve ResourceMsg_DataDownloaded messages |
| 143 // being sent back to renderers as progress is made. | 139 // being sent back to renderers as progress is made. |
| 144 } | 140 } |
| 145 | 141 |
| 146 } // namespace content | 142 } // namespace content |
| OLD | NEW |