Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(124)

Side by Side Diff: content/public/browser/download_item.h

Issue 9518008: Add a const overload to DownloadItem::GetExternalData() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: "Add a comment explaining the const cast" Created 8 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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_
OLDNEW
« no previous file with comments | « content/browser/download/download_item_impl_unittest.cc ('k') | content/test/mock_download_item.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698