Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 // Each download is represented by a DownloadItem, and all DownloadItems | 5 // Each download is represented by a DownloadItem, and all DownloadItems |
| 6 // are owned by the DownloadManager which maintains a global list of all | 6 // are owned by the DownloadManager which maintains a global list of all |
| 7 // downloads. DownloadItems are created when a user initiates a download, | 7 // downloads. DownloadItems are created when a user initiates a download, |
| 8 // and exist for the duration of the browser life time. | 8 // and exist for the duration of the browser life time. |
| 9 // | 9 // |
| 10 // Download observers: | 10 // Download observers: |
| (...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 176 void OnSafeDownloadFinished(DownloadFileManager* file_manager); | 176 void OnSafeDownloadFinished(DownloadFileManager* file_manager); |
| 177 | 177 |
| 178 // Called when the file name for the download is renamed to its final name. | 178 // Called when the file name for the download is renamed to its final name. |
| 179 void OnDownloadRenamedToFinalName(const FilePath& full_path); | 179 void OnDownloadRenamedToFinalName(const FilePath& full_path); |
| 180 | 180 |
| 181 // Returns true if this item matches |query|. |query| must be lower-cased. | 181 // Returns true if this item matches |query|. |query| must be lower-cased. |
| 182 bool MatchesQuery(const string16& query) const; | 182 bool MatchesQuery(const string16& query) const; |
| 183 | 183 |
| 184 // Accessors | 184 // Accessors |
| 185 DownloadState state() const { return state_; } | 185 DownloadState state() const { return state_; } |
| 186 void set_full_path(const FilePath& full_path) { full_path_ = full_path; } | |
|
Randy Smith (Not in Mondays)
2010/12/29 15:58:11
I think this is a leftover from a previous CL; nuk
ahendrickson
2011/01/01 18:15:59
You are correct. Fixed.
| |
| 186 FilePath full_path() const { return full_path_; } | 187 FilePath full_path() const { return full_path_; } |
| 187 void set_path_uniquifier(int uniquifier) { path_uniquifier_ = uniquifier; } | 188 void set_path_uniquifier(int uniquifier) { path_uniquifier_ = uniquifier; } |
| 188 GURL url() const { return url_; } | 189 GURL url() const { return url_; } |
| 189 GURL referrer_url() const { return referrer_url_; } | 190 GURL referrer_url() const { return referrer_url_; } |
| 190 std::string mime_type() const { return mime_type_; } | 191 std::string mime_type() const { return mime_type_; } |
| 191 std::string original_mime_type() const { return original_mime_type_; } | 192 std::string original_mime_type() const { return original_mime_type_; } |
| 192 int64 total_bytes() const { return total_bytes_; } | 193 int64 total_bytes() const { return total_bytes_; } |
| 193 void set_total_bytes(int64 total_bytes) { total_bytes_ = total_bytes; } | 194 void set_total_bytes(int64 total_bytes) { total_bytes_ = total_bytes; } |
| 194 int64 received_bytes() const { return received_bytes_; } | 195 int64 received_bytes() const { return received_bytes_; } |
| 195 int32 id() const { return id_; } | 196 int32 id() const { return id_; } |
| (...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 336 // Did the user open the item either directly or indirectly (such as by | 337 // Did the user open the item either directly or indirectly (such as by |
| 337 // setting always open files of this type)? The shelf also sets this field | 338 // setting always open files of this type)? The shelf also sets this field |
| 338 // when the user closes the shelf before the item has been opened but should | 339 // when the user closes the shelf before the item has been opened but should |
| 339 // be treated as though the user opened it. | 340 // be treated as though the user opened it. |
| 340 bool opened_; | 341 bool opened_; |
| 341 | 342 |
| 342 DISALLOW_COPY_AND_ASSIGN(DownloadItem); | 343 DISALLOW_COPY_AND_ASSIGN(DownloadItem); |
| 343 }; | 344 }; |
| 344 | 345 |
| 345 #endif // CHROME_BROWSER_DOWNLOAD_DOWNLOAD_ITEM_H_ | 346 #endif // CHROME_BROWSER_DOWNLOAD_DOWNLOAD_ITEM_H_ |
| OLD | NEW |