| 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 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <queue> | 9 #include <queue> |
| 10 #include <string> | 10 #include <string> |
| (...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 OnDownloadUpdated(content::DownloadItem* download) OVERRIDE; | 148 virtual void OnDownloadDestructed(content::DownloadItem* download) OVERRIDE; |
| 149 virtual void OnDownloadOpened(content::DownloadItem* download) OVERRIDE {} | |
| 150 | 149 |
| 151 // Update the download history of this item upon completion. | 150 // Update the download history of this item upon completion. |
| 152 void FinalizeDownloadEntry(); | 151 void FinalizeDownloadEntry(); |
| 153 | 152 |
| 154 // Detach from DownloadManager. | 153 // Detach from DownloadManager. |
| 155 void StopObservation(); | 154 void StopObservation(); |
| 156 | 155 |
| 157 // Return max length of a path for a specific base directory. | 156 // Return max length of a path for a specific base directory. |
| 158 // This is needed on POSIX, which restrict the length of file names in | 157 // This is needed on POSIX, which restrict the length of file names in |
| 159 // addition to the restriction on the length of path names. | 158 // addition to the restriction on the length of path names. |
| (...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 322 bool wrote_to_failed_file_; | 321 bool wrote_to_failed_file_; |
| 323 | 322 |
| 324 friend class SavePackageTest; | 323 friend class SavePackageTest; |
| 325 FRIEND_TEST_ALL_PREFIXES(SavePackageTest, TestSuggestedSaveNames); | 324 FRIEND_TEST_ALL_PREFIXES(SavePackageTest, TestSuggestedSaveNames); |
| 326 FRIEND_TEST_ALL_PREFIXES(SavePackageTest, TestLongSafePureFilename); | 325 FRIEND_TEST_ALL_PREFIXES(SavePackageTest, TestLongSafePureFilename); |
| 327 | 326 |
| 328 DISALLOW_COPY_AND_ASSIGN(SavePackage); | 327 DISALLOW_COPY_AND_ASSIGN(SavePackage); |
| 329 }; | 328 }; |
| 330 | 329 |
| 331 #endif // CONTENT_BROWSER_DOWNLOAD_SAVE_PACKAGE_H_ | 330 #endif // CONTENT_BROWSER_DOWNLOAD_SAVE_PACKAGE_H_ |
| OLD | NEW |