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 #ifndef CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_FILE_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_FILE_IMPL_H_ |
6 #define CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_FILE_IMPL_H_ | 6 #define CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_FILE_IMPL_H_ |
7 | 7 |
8 #include "content/browser/download/download_file.h" | 8 #include "content/browser/download/download_file.h" |
9 | 9 |
10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 // The default directory for creating the download file. | 109 // The default directory for creating the download file. |
110 base::FilePath default_download_directory_; | 110 base::FilePath default_download_directory_; |
111 | 111 |
112 // The stream through which data comes. | 112 // The stream through which data comes. |
113 // TODO(rdsmith): Move this into BaseFile; requires using the same | 113 // TODO(rdsmith): Move this into BaseFile; requires using the same |
114 // stream semantics in SavePackage. Alternatively, replace SaveFile | 114 // stream semantics in SavePackage. Alternatively, replace SaveFile |
115 // with DownloadFile and get rid of BaseFile. | 115 // with DownloadFile and get rid of BaseFile. |
116 scoped_ptr<ByteStreamReader> stream_reader_; | 116 scoped_ptr<ByteStreamReader> stream_reader_; |
117 | 117 |
118 // Used to trigger progress updates. | 118 // Used to trigger progress updates. |
119 scoped_ptr<base::RepeatingTimer<DownloadFileImpl> > update_timer_; | 119 scoped_ptr<base::RepeatingTimer> update_timer_; |
120 | 120 |
121 // Statistics | 121 // Statistics |
122 size_t bytes_seen_; | 122 size_t bytes_seen_; |
123 base::TimeDelta disk_writes_time_; | 123 base::TimeDelta disk_writes_time_; |
124 base::TimeTicks download_start_; | 124 base::TimeTicks download_start_; |
125 RateEstimator rate_estimator_; | 125 RateEstimator rate_estimator_; |
126 | 126 |
127 net::BoundNetLog bound_net_log_; | 127 net::BoundNetLog bound_net_log_; |
128 | 128 |
129 base::WeakPtr<DownloadDestinationObserver> observer_; | 129 base::WeakPtr<DownloadDestinationObserver> observer_; |
130 | 130 |
131 base::WeakPtrFactory<DownloadFileImpl> weak_factory_; | 131 base::WeakPtrFactory<DownloadFileImpl> weak_factory_; |
132 | 132 |
133 DISALLOW_COPY_AND_ASSIGN(DownloadFileImpl); | 133 DISALLOW_COPY_AND_ASSIGN(DownloadFileImpl); |
134 }; | 134 }; |
135 | 135 |
136 } // namespace content | 136 } // namespace content |
137 | 137 |
138 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_FILE_IMPL_H_ | 138 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_FILE_IMPL_H_ |
OLD | NEW |