| 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 CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_MANAGER_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_MANAGER_IMPL_H_ |
| 6 #define CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_MANAGER_IMPL_H_ | 6 #define CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_MANAGER_IMPL_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <set> | 9 #include <set> |
| 10 | 10 |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 // Creates a download item for the SavePackage system. | 46 // Creates a download item for the SavePackage system. |
| 47 // Must be called on the UI thread. Note that the DownloadManager | 47 // Must be called on the UI thread. Note that the DownloadManager |
| 48 // retains ownership. | 48 // retains ownership. |
| 49 virtual void CreateSavePackageDownloadItem( | 49 virtual void CreateSavePackageDownloadItem( |
| 50 const base::FilePath& main_file_path, | 50 const base::FilePath& main_file_path, |
| 51 const GURL& page_url, | 51 const GURL& page_url, |
| 52 const std::string& mime_type, | 52 const std::string& mime_type, |
| 53 scoped_ptr<DownloadRequestHandleInterface> request_handle, | 53 scoped_ptr<DownloadRequestHandleInterface> request_handle, |
| 54 const DownloadItemImplCreated& item_created); | 54 const DownloadItemImplCreated& item_created); |
| 55 | 55 |
| 56 // Notifies DownloadManager about a successful completion of |download_item|. | 56 // Notifies DownloadManager about a successful (or not) completion of |
| 57 void OnSavePackageSuccessfullyFinished(DownloadItem* download_item); | 57 // |download_item|. |
| 58 void OnSavePackageFinished(bool success, DownloadItem* download_item); |
| 58 | 59 |
| 59 // DownloadManager functions. | 60 // DownloadManager functions. |
| 60 virtual void SetDelegate(DownloadManagerDelegate* delegate) OVERRIDE; | 61 virtual void SetDelegate(DownloadManagerDelegate* delegate) OVERRIDE; |
| 61 virtual DownloadManagerDelegate* GetDelegate() const OVERRIDE; | 62 virtual DownloadManagerDelegate* GetDelegate() const OVERRIDE; |
| 62 virtual void Shutdown() OVERRIDE; | 63 virtual void Shutdown() OVERRIDE; |
| 63 virtual void GetAllDownloads(DownloadVector* result) OVERRIDE; | 64 virtual void GetAllDownloads(DownloadVector* result) OVERRIDE; |
| 64 virtual void StartDownload( | 65 virtual void StartDownload( |
| 65 scoped_ptr<DownloadCreateInfo> info, | 66 scoped_ptr<DownloadCreateInfo> info, |
| 66 scoped_ptr<ByteStreamReader> stream, | 67 scoped_ptr<ByteStreamReader> stream, |
| 67 const DownloadUrlParameters::OnStartedCallback& on_started) OVERRIDE; | 68 const DownloadUrlParameters::OnStartedCallback& on_started) OVERRIDE; |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 187 net::NetLog* net_log_; | 188 net::NetLog* net_log_; |
| 188 | 189 |
| 189 base::WeakPtrFactory<DownloadManagerImpl> weak_factory_; | 190 base::WeakPtrFactory<DownloadManagerImpl> weak_factory_; |
| 190 | 191 |
| 191 DISALLOW_COPY_AND_ASSIGN(DownloadManagerImpl); | 192 DISALLOW_COPY_AND_ASSIGN(DownloadManagerImpl); |
| 192 }; | 193 }; |
| 193 | 194 |
| 194 } // namespace content | 195 } // namespace content |
| 195 | 196 |
| 196 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_MANAGER_IMPL_H_ | 197 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_MANAGER_IMPL_H_ |
| OLD | NEW |