| 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 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 result_.response_time = response->head.response_time; | 88 result_.response_time = response->head.response_time; |
| 89 result_.load_timing = response->head.load_timing; | 89 result_.load_timing = response->head.load_timing; |
| 90 result_.devtools_info = response->head.devtools_info; | 90 result_.devtools_info = response->head.devtools_info; |
| 91 return true; | 91 return true; |
| 92 } | 92 } |
| 93 | 93 |
| 94 bool SyncResourceHandler::OnWillStart(const GURL& url, bool* defer) { | 94 bool SyncResourceHandler::OnWillStart(const GURL& url, bool* defer) { |
| 95 return true; | 95 return true; |
| 96 } | 96 } |
| 97 | 97 |
| 98 bool SyncResourceHandler::OnBeforeNetworkStart(const GURL& url, bool* defer) { | |
| 99 return true; | |
| 100 } | |
| 101 | |
| 102 bool SyncResourceHandler::OnWillRead(scoped_refptr<net::IOBuffer>* buf, | 98 bool SyncResourceHandler::OnWillRead(scoped_refptr<net::IOBuffer>* buf, |
| 103 int* buf_size, | 99 int* buf_size, |
| 104 int min_size) { | 100 int min_size) { |
| 105 DCHECK(min_size == -1); | 101 DCHECK(min_size == -1); |
| 106 *buf = read_buffer_.get(); | 102 *buf = read_buffer_.get(); |
| 107 *buf_size = kReadBufSize; | 103 *buf_size = kReadBufSize; |
| 108 return true; | 104 return true; |
| 109 } | 105 } |
| 110 | 106 |
| 111 bool SyncResourceHandler::OnReadCompleted(int bytes_read, bool* defer) { | 107 bool SyncResourceHandler::OnReadCompleted(int bytes_read, bool* defer) { |
| (...skipping 22 matching lines...) Expand all Loading... |
| 134 result_message_ = NULL; | 130 result_message_ = NULL; |
| 135 return; | 131 return; |
| 136 } | 132 } |
| 137 | 133 |
| 138 void SyncResourceHandler::OnDataDownloaded(int bytes_downloaded) { | 134 void SyncResourceHandler::OnDataDownloaded(int bytes_downloaded) { |
| 139 // Sync requests don't involve ResourceMsg_DataDownloaded messages | 135 // Sync requests don't involve ResourceMsg_DataDownloaded messages |
| 140 // being sent back to renderers as progress is made. | 136 // being sent back to renderers as progress is made. |
| 141 } | 137 } |
| 142 | 138 |
| 143 } // namespace content | 139 } // namespace content |
| OLD | NEW |