OLD | NEW |
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 CHROME_BROWSER_DOWNLOAD_CHROME_DOWNLOAD_MANAGER_DELEGATE_H_ | 5 #ifndef CHROME_BROWSER_DOWNLOAD_CHROME_DOWNLOAD_MANAGER_DELEGATE_H_ |
6 #define CHROME_BROWSER_DOWNLOAD_CHROME_DOWNLOAD_MANAGER_DELEGATE_H_ | 6 #define CHROME_BROWSER_DOWNLOAD_CHROME_DOWNLOAD_MANAGER_DELEGATE_H_ |
7 | 7 |
8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 #include "base/hash_tables.h" | 9 #include "base/hash_tables.h" |
10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 void ClearLastDownloadPath(); | 97 void ClearLastDownloadPath(); |
98 | 98 |
99 DownloadPrefs* download_prefs() { return download_prefs_.get(); } | 99 DownloadPrefs* download_prefs() { return download_prefs_.get(); } |
100 | 100 |
101 protected: | 101 protected: |
102 // So that test classes can inherit from this for override purposes. | 102 // So that test classes can inherit from this for override purposes. |
103 virtual ~ChromeDownloadManagerDelegate(); | 103 virtual ~ChromeDownloadManagerDelegate(); |
104 | 104 |
105 // So that test classes that inherit from this for override purposes | 105 // So that test classes that inherit from this for override purposes |
106 // can call back into the DownloadManager. | 106 // can call back into the DownloadManager. |
107 scoped_refptr<content::DownloadManager> download_manager_; | 107 content::DownloadManager* download_manager_; |
108 | 108 |
109 virtual safe_browsing::DownloadProtectionService* | 109 virtual safe_browsing::DownloadProtectionService* |
110 GetDownloadProtectionService(); | 110 GetDownloadProtectionService(); |
111 | 111 |
112 // DownloadTargetDeterminerDelegate. Protected for testing. | 112 // DownloadTargetDeterminerDelegate. Protected for testing. |
113 virtual void NotifyExtensions( | 113 virtual void NotifyExtensions( |
114 content::DownloadItem* download, | 114 content::DownloadItem* download, |
115 const base::FilePath& suggested_virtual_path, | 115 const base::FilePath& suggested_virtual_path, |
116 const NotifyExtensionsCallback& callback) OVERRIDE; | 116 const NotifyExtensionsCallback& callback) OVERRIDE; |
117 virtual void ReserveVirtualPath( | 117 virtual void ReserveVirtualPath( |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
171 content::NotificationRegistrar registrar_; | 171 content::NotificationRegistrar registrar_; |
172 | 172 |
173 // The directory most recently chosen by the user in response to a Save As | 173 // The directory most recently chosen by the user in response to a Save As |
174 // dialog for a regular download. | 174 // dialog for a regular download. |
175 base::FilePath last_download_path_; | 175 base::FilePath last_download_path_; |
176 | 176 |
177 DISALLOW_COPY_AND_ASSIGN(ChromeDownloadManagerDelegate); | 177 DISALLOW_COPY_AND_ASSIGN(ChromeDownloadManagerDelegate); |
178 }; | 178 }; |
179 | 179 |
180 #endif // CHROME_BROWSER_DOWNLOAD_CHROME_DOWNLOAD_MANAGER_DELEGATE_H_ | 180 #endif // CHROME_BROWSER_DOWNLOAD_CHROME_DOWNLOAD_MANAGER_DELEGATE_H_ |
OLD | NEW |