Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(114)

Side by Side Diff: content/browser/download/save_package.h

Issue 10704026: Reland DownloadItem::Observer::OnDownloadDestroyed() replaces DownloadItem::REMOVING (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 137
138 void Stop(); 138 void Stop();
139 void CheckFinish(); 139 void CheckFinish();
140 void SaveNextFile(bool process_all_remainder_items); 140 void SaveNextFile(bool process_all_remainder_items);
141 void DoSavingProcess(); 141 void DoSavingProcess();
142 142
143 // content::WebContentsObserver implementation. 143 // content::WebContentsObserver implementation.
144 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; 144 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
145 145
146 // content::DownloadItem::Observer implementation. 146 // content::DownloadItem::Observer implementation.
147 virtual void OnDownloadUpdated(content::DownloadItem* download) OVERRIDE; 147 virtual void OnDownloadDestroyed(content::DownloadItem* download) OVERRIDE;
148 virtual void OnDownloadOpened(content::DownloadItem* download) OVERRIDE {}
149 148
150 // Update the download history of this item upon completion. 149 // Update the download history of this item upon completion.
151 void FinalizeDownloadEntry(); 150 void FinalizeDownloadEntry();
152 151
153 // Detach from DownloadManager. 152 // Detach from DownloadManager.
154 void StopObservation(); 153 void StopObservation();
155 154
156 // Return max length of a path for a specific base directory. 155 // 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 156 // This is needed on POSIX, which restrict the length of file names in
158 // addition to the restriction on the length of path names. 157 // addition to the restriction on the length of path names.
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
321 bool wrote_to_failed_file_; 320 bool wrote_to_failed_file_;
322 321
323 friend class SavePackageTest; 322 friend class SavePackageTest;
324 FRIEND_TEST_ALL_PREFIXES(SavePackageTest, TestSuggestedSaveNames); 323 FRIEND_TEST_ALL_PREFIXES(SavePackageTest, TestSuggestedSaveNames);
325 FRIEND_TEST_ALL_PREFIXES(SavePackageTest, TestLongSafePureFilename); 324 FRIEND_TEST_ALL_PREFIXES(SavePackageTest, TestLongSafePureFilename);
326 325
327 DISALLOW_COPY_AND_ASSIGN(SavePackage); 326 DISALLOW_COPY_AND_ASSIGN(SavePackage);
328 }; 327 };
329 328
330 #endif // CONTENT_BROWSER_DOWNLOAD_SAVE_PACKAGE_H_ 329 #endif // CONTENT_BROWSER_DOWNLOAD_SAVE_PACKAGE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698