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