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

Side by Side Diff: chrome/browser/download/download_target_determiner_delegate.h

Issue 12850002: Move download filename determintion into a separate class. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 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 2013 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 CHROME_BROWSER_DOWNLOAD_DOWNLOAD_TARGET_DETERMINER_DELEGATE_H_
6 #define CHROME_BROWSER_DOWNLOAD_DOWNLOAD_TARGET_DETERMINER_DELEGATE_H_
7
8 #include "base/callback_forward.h"
9
10 class ExtensionDownloadsEventRouter;
11
12 namespace base {
13 class FilePath;
14 }
15
16 namespace content {
17 class DownloadItem;
18 }
19
20 namespace safe_browsing {
21 class DownloadProtectionService;
22 }
23
24 class DownloadTargetDeterminerDelegate {
Randy Smith (Not in Mondays) 2013/04/08 15:39:33 Given that this is the base class and that the der
asanka 2013/04/08 22:44:58 Done.
25 public:
26 typedef base::Callback<void(const base::FilePath&,
27 const base::FilePath&)> FileSelectedCallback;
28
29 typedef base::Callback<void(const base::FilePath&)> LocalPathCallback;
30
31 typedef base::Callback<void(const base::FilePath&,
32 bool)> ReservedPathCallback;
33
34 virtual safe_browsing::DownloadProtectionService*
35 GetDownloadProtectionService() = 0;
36
37 virtual ExtensionDownloadsEventRouter* GetExtensionEventRouter() = 0;
benjhayden 2013/04/09 15:46:32 Would DTD be more modular if Start() took a callba
asanka 2013/04/16 20:34:01 I'd like DTD to be unit testable and getting an ED
benjhayden 2013/04/18 17:33:46 Yes, DTDD::NotifyExtensions() would provide better
38
39 virtual void PromptUserForDownloadPath(
benjhayden 2013/04/09 15:46:32 Why can't DTD do this itself?
asanka 2013/04/16 20:34:01 Testability.
40 content::DownloadItem* download,
41 const base::FilePath& virtual_path,
42 const FileSelectedCallback& callback) = 0;
43
44 virtual void DetermineLocalPath(content::DownloadItem* download,
benjhayden 2013/04/09 15:46:32 Why can't DTD do this itself?
asanka 2013/04/16 20:34:01 Testability.
45 const base::FilePath& virtual_path,
46 const LocalPathCallback& callback) = 0;
47
48 virtual void ReserveVirtualPath(content::DownloadItem* download,
benjhayden 2013/04/09 15:46:32 Why can't DTD do this itself?
asanka 2013/04/16 20:34:01 Testability.
49 const base::FilePath& virtual_path,
50 bool should_uniquify_path,
51 const ReservedPathCallback& callback) = 0;
52
53 protected:
54 virtual ~DownloadTargetDeterminerDelegate();
55 };
56
57 #endif // CHROME_BROWSER_DOWNLOAD_DOWNLOAD_TARGET_DETERMINER_DELEGATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698