| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 #include "chrome/common/render_messages.h" | 6 #include "chrome/common/render_messages.h" |
| 7 | 7 |
| 8 SyncResourceHandler::SyncResourceHandler( | 8 SyncResourceHandler::SyncResourceHandler( |
| 9 ResourceDispatcherHost::Receiver* receiver, | 9 ResourceDispatcherHost::Receiver* receiver, |
| 10 const GURL& url, | 10 const GURL& url, |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 return true; | 39 return true; |
| 40 } | 40 } |
| 41 | 41 |
| 42 bool SyncResourceHandler::OnReadCompleted(int request_id, int* bytes_read) { | 42 bool SyncResourceHandler::OnReadCompleted(int request_id, int* bytes_read) { |
| 43 if (!*bytes_read) | 43 if (!*bytes_read) |
| 44 return true; | 44 return true; |
| 45 result_.data.append(read_buffer_->data(), *bytes_read); | 45 result_.data.append(read_buffer_->data(), *bytes_read); |
| 46 return true; | 46 return true; |
| 47 } | 47 } |
| 48 | 48 |
| 49 bool SyncResourceHandler::OnResponseCompleted(int request_id, | 49 bool SyncResourceHandler::OnResponseCompleted( |
| 50 const URLRequestStatus& status) { | 50 int request_id, |
| 51 const URLRequestStatus& status, |
| 52 const std::string& security_info) { |
| 51 result_.status = status; | 53 result_.status = status; |
| 52 | 54 |
| 53 ViewHostMsg_SyncLoad::WriteReplyParams(result_message_, result_); | 55 ViewHostMsg_SyncLoad::WriteReplyParams(result_message_, result_); |
| 54 receiver_->Send(result_message_); | 56 receiver_->Send(result_message_); |
| 55 return true; | 57 return true; |
| 56 } | 58 } |
| OLD | NEW |