| 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 <memory> | 10 #include <memory> |
| (...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 196 // TODO(asanka): Remove this container in favor of downloads_by_guid_ as a | 196 // TODO(asanka): Remove this container in favor of downloads_by_guid_ as a |
| 197 // part of http://crbug.com/593020. | 197 // part of http://crbug.com/593020. |
| 198 DownloadMap downloads_; | 198 DownloadMap downloads_; |
| 199 | 199 |
| 200 // Same as the above, but maps from GUID to download item. Note that the | 200 // Same as the above, but maps from GUID to download item. Note that the |
| 201 // container is case sensitive. Hence the key needs to be normalized to | 201 // container is case sensitive. Hence the key needs to be normalized to |
| 202 // upper-case when inserting new elements here. Fortunately for us, | 202 // upper-case when inserting new elements here. Fortunately for us, |
| 203 // DownloadItemImpl already normalizes the string GUID. | 203 // DownloadItemImpl already normalizes the string GUID. |
| 204 DownloadGuidMap downloads_by_guid_; | 204 DownloadGuidMap downloads_by_guid_; |
| 205 | 205 |
| 206 int history_size_; | |
| 207 | |
| 208 // True if the download manager has been initialized and requires a shutdown. | 206 // True if the download manager has been initialized and requires a shutdown. |
| 209 bool shutdown_needed_; | 207 bool shutdown_needed_; |
| 210 | 208 |
| 211 // Observers that want to be notified of changes to the set of downloads. | 209 // Observers that want to be notified of changes to the set of downloads. |
| 212 base::ObserverList<Observer> observers_; | 210 base::ObserverList<Observer> observers_; |
| 213 | 211 |
| 214 // The current active browser context. | 212 // The current active browser context. |
| 215 BrowserContext* browser_context_; | 213 BrowserContext* browser_context_; |
| 216 | 214 |
| 217 // Allows an embedder to control behavior. Guaranteed to outlive this object. | 215 // Allows an embedder to control behavior. Guaranteed to outlive this object. |
| 218 DownloadManagerDelegate* delegate_; | 216 DownloadManagerDelegate* delegate_; |
| 219 | 217 |
| 220 net::NetLog* net_log_; | 218 net::NetLog* net_log_; |
| 221 | 219 |
| 222 std::vector<std::unique_ptr<UrlDownloader, BrowserThread::DeleteOnIOThread>> | 220 std::vector<std::unique_ptr<UrlDownloader, BrowserThread::DeleteOnIOThread>> |
| 223 url_downloaders_; | 221 url_downloaders_; |
| 224 | 222 |
| 225 base::WeakPtrFactory<DownloadManagerImpl> weak_factory_; | 223 base::WeakPtrFactory<DownloadManagerImpl> weak_factory_; |
| 226 | 224 |
| 227 DISALLOW_COPY_AND_ASSIGN(DownloadManagerImpl); | 225 DISALLOW_COPY_AND_ASSIGN(DownloadManagerImpl); |
| 228 }; | 226 }; |
| 229 | 227 |
| 230 } // namespace content | 228 } // namespace content |
| 231 | 229 |
| 232 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_MANAGER_IMPL_H_ | 230 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_MANAGER_IMPL_H_ |
| OLD | NEW |