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

Unified Diff: net/disk_cache/disk_cache.h

Issue 27168: IPC messages and changes to ResourceLoaderBridge to support resource loading for media (Closed)
Patch Set: add mac/linux build and fixed unit test failures Created 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/base/load_flags.h ('k') | net/disk_cache/entry_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/disk_cache/disk_cache.h
diff --git a/net/disk_cache/disk_cache.h b/net/disk_cache/disk_cache.h
index 48b7ba5c538fbe5b936a7606ce004e4abef8c8d9..3ea3b25a54d61c100471e3b730578860824d3ab4 100644
--- a/net/disk_cache/disk_cache.h
+++ b/net/disk_cache/disk_cache.h
@@ -160,9 +160,8 @@ class Entry {
// not base::kInvalidPlatformFileValue), there is no guarantee that the file
// is truncated. Implementor can always return base::kInvalidPlatformFileValue
// if external file is not available in that particular implementation.
- // Caller should never close the file handle returned by this method, since
- // the handle should be managed by the implementor of this class. Caller
- // should never save the handle for future use.
+ // The caller should close the file handle returned by this method or there
+ // will be a leak.
// With a stream prepared as an external file, the stream would always be
// kept in an external file since creation, even if the stream has 0 bytes.
// So we need to be cautious about using this option for preparing a stream or
@@ -171,10 +170,10 @@ class Entry {
// directly *without* buffering.
virtual base::PlatformFile UseExternalFile(int index) = 0;
- // Returns a read file handle for the cache stream referenced by |index|.
- // Caller should never close the handle returned by this method and should
- // not save it for future use. The lifetime of the base::PlatformFile handle
- // is managed by the implementor of this class.
+ // Returns an asynchronous read file handle for the cache stream referenced by
+ // |index|. Values other than base::kInvalidPlatformFileValue are successful
+ // and the file handle should be managed by the caller, i.e. caller should
+ // close the handle after use or there will be a leak.
virtual base::PlatformFile GetPlatformFile(int index) = 0;
protected:
« no previous file with comments | « net/base/load_flags.h ('k') | net/disk_cache/entry_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698