| 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 <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <map> | 10 #include <map> |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 #include "content/browser/download/download_item_impl_delegate.h" | 24 #include "content/browser/download/download_item_impl_delegate.h" |
| 25 #include "content/browser/download/url_downloader.h" | 25 #include "content/browser/download/url_downloader.h" |
| 26 #include "content/common/content_export.h" | 26 #include "content/common/content_export.h" |
| 27 #include "content/public/browser/browser_thread.h" | 27 #include "content/public/browser/browser_thread.h" |
| 28 #include "content/public/browser/download_manager.h" | 28 #include "content/public/browser/download_manager.h" |
| 29 #include "content/public/browser/download_manager_delegate.h" | 29 #include "content/public/browser/download_manager_delegate.h" |
| 30 #include "content/public/browser/download_url_parameters.h" | 30 #include "content/public/browser/download_url_parameters.h" |
| 31 | 31 |
| 32 namespace net { | 32 namespace net { |
| 33 class BoundNetLog; | 33 class BoundNetLog; |
| 34 class OriginFilter; |
| 34 } | 35 } |
| 35 | 36 |
| 36 namespace content { | 37 namespace content { |
| 37 class DownloadFileFactory; | 38 class DownloadFileFactory; |
| 38 class DownloadItemFactory; | 39 class DownloadItemFactory; |
| 39 class DownloadItemImpl; | 40 class DownloadItemImpl; |
| 40 class DownloadRequestHandleInterface; | 41 class DownloadRequestHandleInterface; |
| 41 | 42 |
| 42 class CONTENT_EXPORT DownloadManagerImpl : public DownloadManager, | 43 class CONTENT_EXPORT DownloadManagerImpl : public DownloadManager, |
| 43 private DownloadItemImplDelegate { | 44 private DownloadItemImplDelegate { |
| (...skipping 23 matching lines...) Expand all Loading... |
| 67 // DownloadManager functions. | 68 // DownloadManager functions. |
| 68 void SetDelegate(DownloadManagerDelegate* delegate) override; | 69 void SetDelegate(DownloadManagerDelegate* delegate) override; |
| 69 DownloadManagerDelegate* GetDelegate() const override; | 70 DownloadManagerDelegate* GetDelegate() const override; |
| 70 void Shutdown() override; | 71 void Shutdown() override; |
| 71 void GetAllDownloads(DownloadVector* result) override; | 72 void GetAllDownloads(DownloadVector* result) override; |
| 72 void StartDownload( | 73 void StartDownload( |
| 73 scoped_ptr<DownloadCreateInfo> info, | 74 scoped_ptr<DownloadCreateInfo> info, |
| 74 scoped_ptr<ByteStreamReader> stream, | 75 scoped_ptr<ByteStreamReader> stream, |
| 75 const DownloadUrlParameters::OnStartedCallback& on_started) override; | 76 const DownloadUrlParameters::OnStartedCallback& on_started) override; |
| 76 | 77 |
| 77 int RemoveDownloadsByOriginAndTime(const url::Origin& origin, | 78 int RemoveDownloadsByOriginAndTime(const url::OriginFilter* origin, |
| 78 base::Time remove_begin, | 79 base::Time remove_begin, |
| 79 base::Time remove_end) override; | 80 base::Time remove_end) override; |
| 80 int RemoveDownloadsBetween(base::Time remove_begin, | |
| 81 base::Time remove_end) override; | |
| 82 int RemoveDownloads(base::Time remove_begin) override; | 81 int RemoveDownloads(base::Time remove_begin) override; |
| 83 int RemoveAllDownloads() override; | 82 int RemoveAllDownloads() override; |
| 84 void DownloadUrl(scoped_ptr<DownloadUrlParameters> params) override; | 83 void DownloadUrl(scoped_ptr<DownloadUrlParameters> params) override; |
| 85 void AddObserver(Observer* observer) override; | 84 void AddObserver(Observer* observer) override; |
| 86 void RemoveObserver(Observer* observer) override; | 85 void RemoveObserver(Observer* observer) override; |
| 87 content::DownloadItem* CreateDownloadItem( | 86 content::DownloadItem* CreateDownloadItem( |
| 88 uint32_t id, | 87 uint32_t id, |
| 89 const base::FilePath& current_path, | 88 const base::FilePath& current_path, |
| 90 const base::FilePath& target_path, | 89 const base::FilePath& target_path, |
| 91 const std::vector<GURL>& url_chain, | 90 const std::vector<GURL>& url_chain, |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 211 url_downloaders_; | 210 url_downloaders_; |
| 212 | 211 |
| 213 base::WeakPtrFactory<DownloadManagerImpl> weak_factory_; | 212 base::WeakPtrFactory<DownloadManagerImpl> weak_factory_; |
| 214 | 213 |
| 215 DISALLOW_COPY_AND_ASSIGN(DownloadManagerImpl); | 214 DISALLOW_COPY_AND_ASSIGN(DownloadManagerImpl); |
| 216 }; | 215 }; |
| 217 | 216 |
| 218 } // namespace content | 217 } // namespace content |
| 219 | 218 |
| 220 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_MANAGER_IMPL_H_ | 219 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_MANAGER_IMPL_H_ |
| OLD | NEW |