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 <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
138 | 138 |
139 void Stop(); | 139 void Stop(); |
140 void CheckFinish(); | 140 void CheckFinish(); |
141 void SaveNextFile(bool process_all_remainder_items); | 141 void SaveNextFile(bool process_all_remainder_items); |
142 void DoSavingProcess(); | 142 void DoSavingProcess(); |
143 | 143 |
144 // content::WebContentsObserver implementation. | 144 // content::WebContentsObserver implementation. |
145 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; | 145 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; |
146 | 146 |
147 // content::DownloadItem::Observer implementation. | 147 // content::DownloadItem::Observer implementation. |
148 virtual void OnDownloadDestroyed(content::DownloadItem* download) OVERRIDE; | 148 virtual void OnDownloadUpdated(content::DownloadItem* download) OVERRIDE; |
| 149 virtual void OnDownloadOpened(content::DownloadItem* download) OVERRIDE {} |
149 | 150 |
150 // Update the download history of this item upon completion. | 151 // Update the download history of this item upon completion. |
151 void FinalizeDownloadEntry(); | 152 void FinalizeDownloadEntry(); |
152 | 153 |
153 // Detach from DownloadManager. | 154 // Detach from DownloadManager. |
154 void StopObservation(); | 155 void StopObservation(); |
155 | 156 |
156 // Return max length of a path for a specific base directory. | 157 // Return max length of a path for a specific base directory. |
157 // This is needed on POSIX, which restrict the length of file names in | 158 // This is needed on POSIX, which restrict the length of file names in |
158 // addition to the restriction on the length of path names. | 159 // addition to the restriction on the length of path names. |
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
321 bool wrote_to_failed_file_; | 322 bool wrote_to_failed_file_; |
322 | 323 |
323 friend class SavePackageTest; | 324 friend class SavePackageTest; |
324 FRIEND_TEST_ALL_PREFIXES(SavePackageTest, TestSuggestedSaveNames); | 325 FRIEND_TEST_ALL_PREFIXES(SavePackageTest, TestSuggestedSaveNames); |
325 FRIEND_TEST_ALL_PREFIXES(SavePackageTest, TestLongSafePureFilename); | 326 FRIEND_TEST_ALL_PREFIXES(SavePackageTest, TestLongSafePureFilename); |
326 | 327 |
327 DISALLOW_COPY_AND_ASSIGN(SavePackage); | 328 DISALLOW_COPY_AND_ASSIGN(SavePackage); |
328 }; | 329 }; |
329 | 330 |
330 #endif // CONTENT_BROWSER_DOWNLOAD_SAVE_PACKAGE_H_ | 331 #endif // CONTENT_BROWSER_DOWNLOAD_SAVE_PACKAGE_H_ |
OLD | NEW |