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

Side by Side Diff: content/shell/shell_download_manager_delegate.h

Issue 11366121: Split DownloadFile::Rename into RenameAndUniquify and RenameAndAnnotate. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Incorporated comments. Created 8 years, 1 month 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
« no previous file with comments | « content/public/test/test_file_error_injector.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_SHELL_SHELL_DOWNLOAD_MANAGER_DELEGATE_H_ 5 #ifndef CONTENT_SHELL_SHELL_DOWNLOAD_MANAGER_DELEGATE_H_
6 #define CONTENT_SHELL_SHELL_DOWNLOAD_MANAGER_DELEGATE_H_ 6 #define CONTENT_SHELL_SHELL_DOWNLOAD_MANAGER_DELEGATE_H_
7 7
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "content/public/browser/download_manager_delegate.h" 10 #include "content/public/browser/download_manager_delegate.h"
(...skipping 13 matching lines...) Expand all
24 virtual void Shutdown() OVERRIDE; 24 virtual void Shutdown() OVERRIDE;
25 virtual bool DetermineDownloadTarget( 25 virtual bool DetermineDownloadTarget(
26 DownloadItem* download, 26 DownloadItem* download,
27 const DownloadTargetCallback& callback) OVERRIDE; 27 const DownloadTargetCallback& callback) OVERRIDE;
28 virtual void AddItemToPersistentStore(DownloadItem* item) OVERRIDE; 28 virtual void AddItemToPersistentStore(DownloadItem* item) OVERRIDE;
29 29
30 // Inhibits prompting and sets the default download path. 30 // Inhibits prompting and sets the default download path.
31 void SetDownloadBehaviorForTesting( 31 void SetDownloadBehaviorForTesting(
32 const FilePath& default_download_path); 32 const FilePath& default_download_path);
33 33
34 protected:
35 // To allow subclasses for testing.
36 virtual ~ShellDownloadManagerDelegate();
jochen (gone - plz use gerrit) 2012/11/07 21:58:48 why not just friend the test?
Randy Smith (Not in Mondays) 2012/11/07 22:24:55 Huh. My inclination is against, partially because
37
34 private: 38 private:
35 friend class base::RefCountedThreadSafe<ShellDownloadManagerDelegate>; 39 friend class base::RefCountedThreadSafe<ShellDownloadManagerDelegate>;
36 40
37 virtual ~ShellDownloadManagerDelegate();
38 41
39 void GenerateFilename(int32 download_id, 42 void GenerateFilename(int32 download_id,
40 const DownloadTargetCallback& callback, 43 const DownloadTargetCallback& callback,
41 const FilePath& generated_name, 44 const FilePath& generated_name,
42 const FilePath& suggested_directory); 45 const FilePath& suggested_directory);
43 void OnDownloadPathGenerated(int32 download_id, 46 void OnDownloadPathGenerated(int32 download_id,
44 const DownloadTargetCallback& callback, 47 const DownloadTargetCallback& callback,
45 const FilePath& suggested_path); 48 const FilePath& suggested_path);
46 void ChooseDownloadPath(int32 download_id, 49 void ChooseDownloadPath(int32 download_id,
47 const DownloadTargetCallback& callback, 50 const DownloadTargetCallback& callback,
48 const FilePath& suggested_path); 51 const FilePath& suggested_path);
49 52
50 DownloadManager* download_manager_; 53 DownloadManager* download_manager_;
51 FilePath default_download_path_; 54 FilePath default_download_path_;
52 bool suppress_prompting_; 55 bool suppress_prompting_;
53 int64 last_download_db_handle_; 56 int64 last_download_db_handle_;
54 57
55 DISALLOW_COPY_AND_ASSIGN(ShellDownloadManagerDelegate); 58 DISALLOW_COPY_AND_ASSIGN(ShellDownloadManagerDelegate);
56 }; 59 };
57 60
58 } // namespace content 61 } // namespace content
59 62
60 #endif // CONTENT_SHELL_SHELL_DOWNLOAD_MANAGER_DELEGATE_H_ 63 #endif // CONTENT_SHELL_SHELL_DOWNLOAD_MANAGER_DELEGATE_H_
OLDNEW
« no previous file with comments | « content/public/test/test_file_error_injector.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698