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 // Each download is represented by a DownloadItem, and all DownloadItems | 5 // Each download is represented by a DownloadItem, and all DownloadItems |
6 // are owned by the DownloadManager which maintains a global list of all | 6 // are owned by the DownloadManager which maintains a global list of all |
7 // downloads. DownloadItems are created when a user initiates a download, | 7 // downloads. DownloadItems are created when a user initiates a download, |
8 // and exist for the duration of the browser life time. | 8 // and exist for the duration of the browser life time. |
9 // | 9 // |
10 // Download observers: | 10 // Download observers: |
(...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
337 // static char subsystem_specific_string[] = ".."; defined | 337 // static char subsystem_specific_string[] = ".."; defined |
338 // in the subsystem, but the only requirement of this interface | 338 // in the subsystem, but the only requirement of this interface |
339 // is that the key be unique over all data stored with this | 339 // is that the key be unique over all data stored with this |
340 // DownloadItem. | 340 // DownloadItem. |
341 // | 341 // |
342 // Note that SetExternalData takes ownership of the | 342 // Note that SetExternalData takes ownership of the |
343 // passed object; it will be destroyed when the DownloadItem is. | 343 // passed object; it will be destroyed when the DownloadItem is. |
344 // If an object is already held by the DownloadItem associated with | 344 // If an object is already held by the DownloadItem associated with |
345 // the passed key, it will be destroyed if overwriten by a new pointer | 345 // the passed key, it will be destroyed if overwriten by a new pointer |
346 // (overwrites by the same pointer are ignored). | 346 // (overwrites by the same pointer are ignored). |
347 virtual ExternalData* GetExternalData(const void* key) = 0; | 347 virtual ExternalData* GetExternalData(const void* key) = 0; |
| 348 virtual const ExternalData* GetExternalData(const void* key) const = 0; |
348 virtual void SetExternalData(const void* key, ExternalData* data) = 0; | 349 virtual void SetExternalData(const void* key, ExternalData* data) = 0; |
349 | 350 |
350 virtual std::string DebugString(bool verbose) const = 0; | 351 virtual std::string DebugString(bool verbose) const = 0; |
351 | 352 |
352 virtual void MockDownloadOpenForTesting() = 0; | 353 virtual void MockDownloadOpenForTesting() = 0; |
353 }; | 354 }; |
354 | 355 |
355 } // namespace content | 356 } // namespace content |
356 | 357 |
357 #endif // CONTENT_PUBLIC_BROWSER_DOWNLOAD_ITEM_H_ | 358 #endif // CONTENT_PUBLIC_BROWSER_DOWNLOAD_ITEM_H_ |
OLD | NEW |