| 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/renderer_host/sync_resource_handler.h" | 5 #include "content/browser/renderer_host/sync_resource_handler.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "content/browser/debugger/devtools_netlog_observer.h" | 8 #include "content/browser/debugger/devtools_netlog_observer.h" |
| 9 #include "content/browser/renderer_host/resource_dispatcher_host_impl.h" | 9 #include "content/browser/renderer_host/resource_dispatcher_host_impl.h" |
| 10 #include "content/browser/renderer_host/resource_message_filter.h" | 10 #include "content/browser/renderer_host/resource_message_filter.h" |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 if (!*bytes_read) | 104 if (!*bytes_read) |
| 105 return true; | 105 return true; |
| 106 result_.data.append(read_buffer_->data(), *bytes_read); | 106 result_.data.append(read_buffer_->data(), *bytes_read); |
| 107 return true; | 107 return true; |
| 108 } | 108 } |
| 109 | 109 |
| 110 bool SyncResourceHandler::OnResponseCompleted( | 110 bool SyncResourceHandler::OnResponseCompleted( |
| 111 int request_id, | 111 int request_id, |
| 112 const net::URLRequestStatus& status, | 112 const net::URLRequestStatus& status, |
| 113 const std::string& security_info) { | 113 const std::string& security_info) { |
| 114 result_.status = status; | 114 result_.error_code = status.error(); |
| 115 | 115 |
| 116 result_.encoded_data_length = | 116 result_.encoded_data_length = |
| 117 DevToolsNetLogObserver::GetAndResetEncodedDataLength(request_); | 117 DevToolsNetLogObserver::GetAndResetEncodedDataLength(request_); |
| 118 | 118 |
| 119 ResourceHostMsg_SyncLoad::WriteReplyParams(result_message_, result_); | 119 ResourceHostMsg_SyncLoad::WriteReplyParams(result_message_, result_); |
| 120 filter_->Send(result_message_); | 120 filter_->Send(result_message_); |
| 121 result_message_ = NULL; | 121 result_message_ = NULL; |
| 122 return true; | 122 return true; |
| 123 } | 123 } |
| 124 | 124 |
| 125 } // namespace content | 125 } // namespace content |
| OLD | NEW |