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

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

Issue 7461106: Inform disk cache of WebKit memory cache hits. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 5 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #pragma once 7 #pragma once
8 8
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "net/base/net_log.h" 10 #include "net/base/net_log.h"
(...skipping 28 matching lines...) Expand all
39 CompletionCallback* callback); 39 CompletionCallback* callback);
40 int WriteDataImpl(int index, int offset, net::IOBuffer* buf, int buf_len, 40 int WriteDataImpl(int index, int offset, net::IOBuffer* buf, int buf_len,
41 CompletionCallback* callback, bool truncate); 41 CompletionCallback* callback, bool truncate);
42 int ReadSparseDataImpl(int64 offset, net::IOBuffer* buf, int buf_len, 42 int ReadSparseDataImpl(int64 offset, net::IOBuffer* buf, int buf_len,
43 CompletionCallback* callback); 43 CompletionCallback* callback);
44 int WriteSparseDataImpl(int64 offset, net::IOBuffer* buf, int buf_len, 44 int WriteSparseDataImpl(int64 offset, net::IOBuffer* buf, int buf_len,
45 CompletionCallback* callback); 45 CompletionCallback* callback);
46 int GetAvailableRangeImpl(int64 offset, int len, int64* start); 46 int GetAvailableRangeImpl(int64 offset, int len, int64* start);
47 void CancelSparseIOImpl(); 47 void CancelSparseIOImpl();
48 int ReadyForSparseIOImpl(CompletionCallback* callback); 48 int ReadyForSparseIOImpl(CompletionCallback* callback);
49 void UpdateRankForExternalCacheHitImpl();
49 50
50 inline CacheEntryBlock* entry() { 51 inline CacheEntryBlock* entry() {
51 return &entry_; 52 return &entry_;
52 } 53 }
53 54
54 inline CacheRankingsBlock* rankings() { 55 inline CacheRankingsBlock* rankings() {
55 return &node_; 56 return &node_;
56 } 57 }
57 58
58 uint32 GetHash(); 59 uint32 GetHash();
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 bool truncate); 142 bool truncate);
142 virtual int ReadSparseData(int64 offset, net::IOBuffer* buf, int buf_len, 143 virtual int ReadSparseData(int64 offset, net::IOBuffer* buf, int buf_len,
143 net::CompletionCallback* completion_callback); 144 net::CompletionCallback* completion_callback);
144 virtual int WriteSparseData(int64 offset, net::IOBuffer* buf, int buf_len, 145 virtual int WriteSparseData(int64 offset, net::IOBuffer* buf, int buf_len,
145 net::CompletionCallback* completion_callback); 146 net::CompletionCallback* completion_callback);
146 virtual int GetAvailableRange(int64 offset, int len, int64* start, 147 virtual int GetAvailableRange(int64 offset, int len, int64* start,
147 CompletionCallback* callback); 148 CompletionCallback* callback);
148 virtual bool CouldBeSparse() const; 149 virtual bool CouldBeSparse() const;
149 virtual void CancelSparseIO(); 150 virtual void CancelSparseIO();
150 virtual int ReadyForSparseIO(net::CompletionCallback* completion_callback); 151 virtual int ReadyForSparseIO(net::CompletionCallback* completion_callback);
152 virtual void UpdateRankForExternalCacheHit();
151 153
152 private: 154 private:
153 enum { 155 enum {
154 kNumStreams = 3 156 kNumStreams = 3
155 }; 157 };
156 class UserBuffer; 158 class UserBuffer;
157 159
158 virtual ~EntryImpl(); 160 virtual ~EntryImpl();
159 161
160 // Do all the work for ReadDataImpl and WriteDataImpl. Implemented as 162 // Do all the work for ReadDataImpl and WriteDataImpl. Implemented as
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
249 scoped_ptr<SparseControl> sparse_; // Support for sparse entries. 251 scoped_ptr<SparseControl> sparse_; // Support for sparse entries.
250 252
251 net::BoundNetLog net_log_; 253 net::BoundNetLog net_log_;
252 254
253 DISALLOW_COPY_AND_ASSIGN(EntryImpl); 255 DISALLOW_COPY_AND_ASSIGN(EntryImpl);
254 }; 256 };
255 257
256 } // namespace disk_cache 258 } // namespace disk_cache
257 259
258 #endif // NET_DISK_CACHE_ENTRY_IMPL_H_ 260 #endif // NET_DISK_CACHE_ENTRY_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698