OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 CHROME_BROWSER_DOWNLOAD_SAVE_PACKAGE_H_ | 5 #ifndef CHROME_BROWSER_DOWNLOAD_SAVE_PACKAGE_H_ |
6 #define CHROME_BROWSER_DOWNLOAD_SAVE_PACKAGE_H_ | 6 #define CHROME_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 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
144 virtual void FileSelectionCanceled(void* params); | 144 virtual void FileSelectionCanceled(void* params); |
145 | 145 |
146 private: | 146 private: |
147 friend class base::RefCountedThreadSafe<SavePackage>; | 147 friend class base::RefCountedThreadSafe<SavePackage>; |
148 | 148 |
149 // For testing only. | 149 // For testing only. |
150 SavePackage(TabContentsWrapper* wrapper, | 150 SavePackage(TabContentsWrapper* wrapper, |
151 const FilePath& file_full_path, | 151 const FilePath& file_full_path, |
152 const FilePath& directory_full_path); | 152 const FilePath& directory_full_path); |
153 | 153 |
154 ~SavePackage(); | 154 virtual ~SavePackage(); |
155 | 155 |
156 // Notes from Init() above applies here as well. | 156 // Notes from Init() above applies here as well. |
157 void InternalInit(); | 157 void InternalInit(); |
158 | 158 |
159 void Stop(); | 159 void Stop(); |
160 void CheckFinish(); | 160 void CheckFinish(); |
161 void SaveNextFile(bool process_all_remainder_items); | 161 void SaveNextFile(bool process_all_remainder_items); |
162 void DoSavingProcess(); | 162 void DoSavingProcess(); |
163 | 163 |
164 // TabContentsObserver implementation. | 164 // TabContentsObserver implementation. |
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
318 friend class SavePackageTest; | 318 friend class SavePackageTest; |
319 FRIEND_TEST_ALL_PREFIXES(SavePackageTest, TestSuggestedSaveNames); | 319 FRIEND_TEST_ALL_PREFIXES(SavePackageTest, TestSuggestedSaveNames); |
320 FRIEND_TEST_ALL_PREFIXES(SavePackageTest, TestLongSafePureFilename); | 320 FRIEND_TEST_ALL_PREFIXES(SavePackageTest, TestLongSafePureFilename); |
321 | 321 |
322 ScopedRunnableMethodFactory<SavePackage> method_factory_; | 322 ScopedRunnableMethodFactory<SavePackage> method_factory_; |
323 | 323 |
324 DISALLOW_COPY_AND_ASSIGN(SavePackage); | 324 DISALLOW_COPY_AND_ASSIGN(SavePackage); |
325 }; | 325 }; |
326 | 326 |
327 #endif // CHROME_BROWSER_DOWNLOAD_SAVE_PACKAGE_H_ | 327 #endif // CHROME_BROWSER_DOWNLOAD_SAVE_PACKAGE_H_ |
OLD | NEW |