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

Side by Side Diff: content/public/browser/download_destination_controller.h

Issue 10799005: Replace the DownloadFileManager with direct ownership (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed try job problems. Created 8 years, 4 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_DESTINATION_CONTROLLER_H_
6 #define CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_DESTINATION_CONTROLLER_H_
7
8 #include <string>
9
10 #include "content/public/browser/download_interrupt_reasons.h"
11
12 namespace content {
13
14 // Class that receives asynchronous events from a DownloadDestination
15 // about downloading progress and completion. These describe
16 // the process of writing the data to the final location (e.g. |bytes_so_far| is
17 // bytes_written, and |reason| is errors occuring on writing data).
benjhayden 2012/07/25 15:19:16 Then perhaps rename |bytes_so_far| to |bytes_writt
Randy Smith (Not in Mondays) 2012/07/30 01:07:23 Hmmm. What I was trying to express with this comm
18 //
19 // All methods must be invoked on the UI thread.
20 //
21 // Note that this interface does not deal with cross-thread lifetime
22 // issues.
23 class DownloadDestinationController {
24 public:
25 virtual void DestinationUpdate(int64 bytes_so_far,
26 int64 bytes_per_sec,
27 const std::string& hash_state) = 0;
28
29 virtual void DestinationError(DownloadInterruptReason reason) = 0;
30
31 virtual void DestinationCompleted(const std::string& final_hash) = 0;
32 };
33
34 } // namespace content
35
36 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_FILE_CONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698