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_SAVE_PACKAGE_H_ | 5 #ifndef CONTENT_BROWSER_DOWNLOAD_SAVE_PACKAGE_H_ |
6 #define CONTENT_BROWSER_DOWNLOAD_SAVE_PACKAGE_H_ | 6 #define CONTENT_BROWSER_DOWNLOAD_SAVE_PACKAGE_H_ |
7 | 7 |
8 #include <queue> | 8 #include <queue> |
9 #include <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
110 | 110 |
111 // Rough percent complete, -1 means we don't know (since we didn't receive a | 111 // Rough percent complete, -1 means we don't know (since we didn't receive a |
112 // total size). | 112 // total size). |
113 int PercentComplete(); | 113 int PercentComplete(); |
114 | 114 |
115 bool canceled() const { return user_canceled_ || disk_error_occurred_; } | 115 bool canceled() const { return user_canceled_ || disk_error_occurred_; } |
116 bool finished() const { return finished_; } | 116 bool finished() const { return finished_; } |
117 SavePageType save_type() const { return save_type_; } | 117 SavePageType save_type() const { return save_type_; } |
118 int contents_id() const { return contents_id_; } | 118 int contents_id() const { return contents_id_; } |
119 int id() const { return unique_id_; } | 119 int id() const { return unique_id_; } |
120 WebContents* web_contents() const; | |
121 | 120 |
122 void GetSaveInfo(); | 121 void GetSaveInfo(); |
123 | 122 |
124 private: | 123 private: |
125 friend class base::RefCountedThreadSafe<SavePackage>; | 124 friend class base::RefCountedThreadSafe<SavePackage>; |
126 | 125 |
127 void InitWithDownloadItem( | 126 void InitWithDownloadItem( |
128 const SavePackageDownloadCreatedCallback& download_created_callback, | 127 const SavePackageDownloadCreatedCallback& download_created_callback, |
129 DownloadItemImpl* item); | 128 DownloadItemImpl* item); |
130 | 129 |
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
331 friend class SavePackageTest; | 330 friend class SavePackageTest; |
332 FRIEND_TEST_ALL_PREFIXES(SavePackageTest, TestSuggestedSaveNames); | 331 FRIEND_TEST_ALL_PREFIXES(SavePackageTest, TestSuggestedSaveNames); |
333 FRIEND_TEST_ALL_PREFIXES(SavePackageTest, TestLongSafePureFilename); | 332 FRIEND_TEST_ALL_PREFIXES(SavePackageTest, TestLongSafePureFilename); |
334 | 333 |
335 DISALLOW_COPY_AND_ASSIGN(SavePackage); | 334 DISALLOW_COPY_AND_ASSIGN(SavePackage); |
336 }; | 335 }; |
337 | 336 |
338 } // namespace content | 337 } // namespace content |
339 | 338 |
340 #endif // CONTENT_BROWSER_DOWNLOAD_SAVE_PACKAGE_H_ | 339 #endif // CONTENT_BROWSER_DOWNLOAD_SAVE_PACKAGE_H_ |
OLD | NEW |