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

Side by Side Diff: net/disk_cache/entry_impl.h

Issue 113931: Remove code path that passes a file handle to the renderer... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 6 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
« no previous file with comments | « net/disk_cache/disk_cache.h ('k') | net/disk_cache/entry_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 NET_DISK_CACHE_ENTRY_IMPL_H_ 5 #ifndef NET_DISK_CACHE_ENTRY_IMPL_H_
6 #define NET_DISK_CACHE_ENTRY_IMPL_H_ 6 #define NET_DISK_CACHE_ENTRY_IMPL_H_
7 7
8 #include "base/scoped_ptr.h" 8 #include "base/scoped_ptr.h"
9 #include "net/disk_cache/disk_cache.h" 9 #include "net/disk_cache/disk_cache.h"
10 #include "net/disk_cache/storage_block.h" 10 #include "net/disk_cache/storage_block.h"
(...skipping 15 matching lines...) Expand all
26 virtual void Close(); 26 virtual void Close();
27 virtual std::string GetKey() const; 27 virtual std::string GetKey() const;
28 virtual base::Time GetLastUsed() const; 28 virtual base::Time GetLastUsed() const;
29 virtual base::Time GetLastModified() const; 29 virtual base::Time GetLastModified() const;
30 virtual int32 GetDataSize(int index) const; 30 virtual int32 GetDataSize(int index) const;
31 virtual int ReadData(int index, int offset, net::IOBuffer* buf, int buf_len, 31 virtual int ReadData(int index, int offset, net::IOBuffer* buf, int buf_len,
32 net::CompletionCallback* completion_callback); 32 net::CompletionCallback* completion_callback);
33 virtual int WriteData(int index, int offset, net::IOBuffer* buf, int buf_len, 33 virtual int WriteData(int index, int offset, net::IOBuffer* buf, int buf_len,
34 net::CompletionCallback* completion_callback, 34 net::CompletionCallback* completion_callback,
35 bool truncate); 35 bool truncate);
36 virtual base::PlatformFile UseExternalFile(int index);
37 virtual base::PlatformFile GetPlatformFile(int index);
38 36
39 inline CacheEntryBlock* entry() { 37 inline CacheEntryBlock* entry() {
40 return &entry_; 38 return &entry_;
41 } 39 }
42 40
43 inline CacheRankingsBlock* rankings() { 41 inline CacheRankingsBlock* rankings() {
44 return &node_; 42 return &node_;
45 } 43 }
46 44
47 uint32 GetHash(); 45 uint32 GetHash();
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 void Log(const char* msg); 137 void Log(const char* msg);
140 138
141 CacheEntryBlock entry_; // Key related information for this entry. 139 CacheEntryBlock entry_; // Key related information for this entry.
142 CacheRankingsBlock node_; // Rankings related information for this entry. 140 CacheRankingsBlock node_; // Rankings related information for this entry.
143 BackendImpl* backend_; // Back pointer to the cache. 141 BackendImpl* backend_; // Back pointer to the cache.
144 scoped_array<char> user_buffers_[NUM_STREAMS]; // Store user data. 142 scoped_array<char> user_buffers_[NUM_STREAMS]; // Store user data.
145 scoped_refptr<File> files_[NUM_STREAMS + 1]; // Files to store external user 143 scoped_refptr<File> files_[NUM_STREAMS + 1]; // Files to store external user
146 // data and key. 144 // data and key.
147 int unreported_size_[NUM_STREAMS]; // Bytes not reported yet to the backend. 145 int unreported_size_[NUM_STREAMS]; // Bytes not reported yet to the backend.
148 bool doomed_; // True if this entry was removed from the cache. 146 bool doomed_; // True if this entry was removed from the cache.
149 bool need_file_[NUM_STREAMS]; // True if stream is prepared as an external
150 // file.
151 DISALLOW_EVIL_CONSTRUCTORS(EntryImpl); 147 DISALLOW_EVIL_CONSTRUCTORS(EntryImpl);
152 }; 148 };
153 149
154 } // namespace disk_cache 150 } // namespace disk_cache
155 151
156 #endif // NET_DISK_CACHE_ENTRY_IMPL_H_ 152 #endif // NET_DISK_CACHE_ENTRY_IMPL_H_
OLDNEW
« no previous file with comments | « net/disk_cache/disk_cache.h ('k') | net/disk_cache/entry_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698