| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 #ifndef CHROME_BROWSER_CHROMEOS_DRIVE_DRIVE_URL_REQUEST_JOB_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_DRIVE_DRIVE_URL_REQUEST_JOB_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_DRIVE_DRIVE_URL_REQUEST_JOB_H_ | 6 #define CHROME_BROWSER_CHROMEOS_DRIVE_DRIVE_URL_REQUEST_JOB_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| 11 #include "base/callback.h" | 11 #include "base/callback.h" |
| 12 #include "base/files/file_path.h" | 12 #include "base/files/file_path.h" |
| 13 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
| 14 #include "base/memory/scoped_vector.h" |
| 14 #include "base/memory/weak_ptr.h" | 15 #include "base/memory/weak_ptr.h" |
| 15 #include "base/string_piece.h" | 16 #include "base/string_piece.h" |
| 16 #include "chrome/browser/chromeos/drive/drive_file_error.h" | 17 #include "chrome/browser/chromeos/drive/drive_file_error.h" |
| 17 #include "chrome/browser/chromeos/drive/drive_resource_metadata.h" | 18 #include "chrome/browser/chromeos/drive/drive_resource_metadata.h" |
| 18 #include "chrome/browser/google_apis/gdata_errorcode.h" | 19 #include "chrome/browser/google_apis/gdata_errorcode.h" |
| 19 #include "net/url_request/url_request_job.h" | 20 #include "net/url_request/url_request_job.h" |
| 20 | 21 |
| 21 namespace net { | 22 namespace net { |
| 22 class FileStream; | 23 class FileStream; |
| 23 class HttpResponseInfo; | 24 class HttpResponseInfo; |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 base::FilePath local_file_path_; | 125 base::FilePath local_file_path_; |
| 125 base::FilePath drive_file_path_; | 126 base::FilePath drive_file_path_; |
| 126 std::string mime_type_; | 127 std::string mime_type_; |
| 127 int64 initial_file_size_; | 128 int64 initial_file_size_; |
| 128 int64 remaining_bytes_; | 129 int64 remaining_bytes_; |
| 129 scoped_ptr<net::FileStream> stream_; | 130 scoped_ptr<net::FileStream> stream_; |
| 130 scoped_ptr<net::HttpResponseInfo> response_info_; | 131 scoped_ptr<net::HttpResponseInfo> response_info_; |
| 131 bool streaming_download_; | 132 bool streaming_download_; |
| 132 scoped_refptr<net::IOBuffer> read_buf_; | 133 scoped_refptr<net::IOBuffer> read_buf_; |
| 133 base::StringPiece read_buf_remaining_; | 134 base::StringPiece read_buf_remaining_; |
| 134 std::string download_buf_; | 135 ScopedVector<std::string> pending_downloaded_data_; |
| 135 base::StringPiece download_buf_remaining_; | |
| 136 | 136 |
| 137 // This should remain the last member so it'll be destroyed first and | 137 // This should remain the last member so it'll be destroyed first and |
| 138 // invalidate its weak pointers before other members are destroyed. | 138 // invalidate its weak pointers before other members are destroyed. |
| 139 base::WeakPtrFactory<DriveURLRequestJob> weak_ptr_factory_; | 139 base::WeakPtrFactory<DriveURLRequestJob> weak_ptr_factory_; |
| 140 DISALLOW_COPY_AND_ASSIGN(DriveURLRequestJob); | 140 DISALLOW_COPY_AND_ASSIGN(DriveURLRequestJob); |
| 141 }; | 141 }; |
| 142 | 142 |
| 143 } // namespace drive | 143 } // namespace drive |
| 144 | 144 |
| 145 #endif // CHROME_BROWSER_CHROMEOS_DRIVE_DRIVE_URL_REQUEST_JOB_H_ | 145 #endif // CHROME_BROWSER_CHROMEOS_DRIVE_DRIVE_URL_REQUEST_JOB_H_ |
| OLD | NEW |