| 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 // This file contains an implementation of the ResourceLoaderBridge class. | 5 // This file contains an implementation of the ResourceLoaderBridge class. |
| 6 // The class is implemented using net::URLRequest, meaning it is a "simple" | 6 // The class is implemented using net::URLRequest, meaning it is a "simple" |
| 7 // version that directly issues requests. The more complicated one used in the | 7 // version that directly issues requests. The more complicated one used in the |
| 8 // browser uses IPC. | 8 // browser uses IPC. |
| 9 // | 9 // |
| 10 // Because net::URLRequest only provides an asynchronous resource loading API, | 10 // Because net::URLRequest only provides an asynchronous resource loading API, |
| (...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 388 FROM_HERE, | 388 FROM_HERE, |
| 389 base::Bind(&RequestProxy::AsyncReadData, this)); | 389 base::Bind(&RequestProxy::AsyncReadData, this)); |
| 390 | 390 |
| 391 peer_->OnDownloadedData(bytes_read); | 391 peer_->OnDownloadedData(bytes_read); |
| 392 } | 392 } |
| 393 | 393 |
| 394 void NotifyCompletedRequest(const net::URLRequestStatus& status, | 394 void NotifyCompletedRequest(const net::URLRequestStatus& status, |
| 395 const std::string& security_info, | 395 const std::string& security_info, |
| 396 const base::TimeTicks& complete_time) { | 396 const base::TimeTicks& complete_time) { |
| 397 if (peer_) { | 397 if (peer_) { |
| 398 peer_->OnCompletedRequest(status, security_info, complete_time); | 398 peer_->OnCompletedRequest(status, false, security_info, complete_time); |
| 399 DropPeer(); // ensure no further notifications | 399 DropPeer(); // ensure no further notifications |
| 400 } | 400 } |
| 401 } | 401 } |
| 402 | 402 |
| 403 void NotifyUploadProgress(uint64 position, uint64 size) { | 403 void NotifyUploadProgress(uint64 position, uint64 size) { |
| 404 if (peer_) | 404 if (peer_) |
| 405 peer_->OnUploadProgress(position, size); | 405 peer_->OnUploadProgress(position, size); |
| 406 } | 406 } |
| 407 | 407 |
| 408 // -------------------------------------------------------------------------- | 408 // -------------------------------------------------------------------------- |
| (...skipping 721 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1130 (http_prefix.SchemeIs("http") || http_prefix.SchemeIs("https"))); | 1130 (http_prefix.SchemeIs("http") || http_prefix.SchemeIs("https"))); |
| 1131 g_file_over_http_params = new FileOverHTTPParams(file_path_template, | 1131 g_file_over_http_params = new FileOverHTTPParams(file_path_template, |
| 1132 http_prefix); | 1132 http_prefix); |
| 1133 } | 1133 } |
| 1134 | 1134 |
| 1135 // static | 1135 // static |
| 1136 webkit_glue::ResourceLoaderBridge* SimpleResourceLoaderBridge::Create( | 1136 webkit_glue::ResourceLoaderBridge* SimpleResourceLoaderBridge::Create( |
| 1137 const webkit_glue::ResourceLoaderBridge::RequestInfo& request_info) { | 1137 const webkit_glue::ResourceLoaderBridge::RequestInfo& request_info) { |
| 1138 return new ResourceLoaderBridgeImpl(request_info); | 1138 return new ResourceLoaderBridgeImpl(request_info); |
| 1139 } | 1139 } |
| OLD | NEW |