OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 <stdint.h> | 5 #include <stdint.h> |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/callback.h" | 9 #include "base/callback.h" |
10 #include "base/files/file.h" | 10 #include "base/files/file.h" |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 | 45 |
46 void Load(const blink::WebURLRequest& request); | 46 void Load(const blink::WebURLRequest& request); |
47 | 47 |
48 private: | 48 private: |
49 // WebURLLoaderClient implementation. | 49 // WebURLLoaderClient implementation. |
50 void didReceiveResponse(blink::WebURLLoader* loader, | 50 void didReceiveResponse(blink::WebURLLoader* loader, |
51 const blink::WebURLResponse& response) override; | 51 const blink::WebURLResponse& response) override; |
52 void didReceiveData(blink::WebURLLoader* loader, | 52 void didReceiveData(blink::WebURLLoader* loader, |
53 const char* data, | 53 const char* data, |
54 int data_length, | 54 int data_length, |
55 int encoded_data_length) override; | 55 int encoded_data_length, |
| 56 int encoded_body_length) override; |
56 void didFinishLoading(blink::WebURLLoader* loader, | 57 void didFinishLoading(blink::WebURLLoader* loader, |
57 double finish_time, | 58 double finish_time, |
58 int64_t total_encoded_data_length) override; | 59 int64_t total_encoded_data_length) override; |
59 void didFail(blink::WebURLLoader* loader, | 60 void didFail(blink::WebURLLoader* loader, |
60 const blink::WebURLError& error) override; | 61 const blink::WebURLError& error) override; |
61 | 62 |
62 std::unique_ptr<blink::WebURLLoader> url_loader_; | 63 std::unique_ptr<blink::WebURLLoader> url_loader_; |
63 base::File file_; | 64 base::File file_; |
64 StatusCallback status_cb_; | 65 StatusCallback status_cb_; |
65 ProgressCallback progress_cb_; | 66 ProgressCallback progress_cb_; |
66 int http_status_code_; | 67 int http_status_code_; |
67 int64_t total_bytes_received_; | 68 int64_t total_bytes_received_; |
68 int64_t total_bytes_to_be_received_; | 69 int64_t total_bytes_to_be_received_; |
69 Status status_; | 70 Status status_; |
70 }; | 71 }; |
71 | 72 |
72 } // namespace nacl | 73 } // namespace nacl |
OLD | NEW |