| 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" |
| 11 #include "components/nacl/renderer/ppb_nacl_private.h" | 11 #include "components/nacl/renderer/ppb_nacl_private.h" |
| 12 #include "third_party/WebKit/public/web/WebAssociatedURLLoaderClient.h" | 12 #include "third_party/WebKit/public/web/WebAssociatedURLLoaderClient.h" |
| 13 | 13 |
| 14 namespace blink { | 14 namespace blink { |
| 15 class WebAssociatedURLLoader; | 15 class WebAssociatedURLLoader; |
| 16 struct WebURLError; | 16 struct WebURLError; |
| 17 class WebURLLoader; | |
| 18 class WebURLResponse; | 17 class WebURLResponse; |
| 19 } | 18 } |
| 20 | 19 |
| 21 namespace nacl { | 20 namespace nacl { |
| 22 | 21 |
| 23 // Downloads a file and writes the contents to a specified file open for | 22 // Downloads a file and writes the contents to a specified file open for |
| 24 // writing. | 23 // writing. |
| 25 class FileDownloader : public blink::WebAssociatedURLLoaderClient { | 24 class FileDownloader : public blink::WebAssociatedURLLoaderClient { |
| 26 public: | 25 public: |
| 27 enum Status { | 26 enum Status { |
| (...skipping 29 matching lines...) Expand all Loading... |
| 57 base::File file_; | 56 base::File file_; |
| 58 StatusCallback status_cb_; | 57 StatusCallback status_cb_; |
| 59 ProgressCallback progress_cb_; | 58 ProgressCallback progress_cb_; |
| 60 int http_status_code_; | 59 int http_status_code_; |
| 61 int64_t total_bytes_received_; | 60 int64_t total_bytes_received_; |
| 62 int64_t total_bytes_to_be_received_; | 61 int64_t total_bytes_to_be_received_; |
| 63 Status status_; | 62 Status status_; |
| 64 }; | 63 }; |
| 65 | 64 |
| 66 } // namespace nacl | 65 } // namespace nacl |
| OLD | NEW |