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

Side by Side Diff: net/disk_cache/simple/simple_entry_impl.h

Issue 2591743002: Implement a method to get the total size of a cache entry (Closed)
Patch Set: rebase Created 3 years, 11 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
« no previous file with comments | « net/disk_cache/memory/mem_entry_impl.cc ('k') | net/disk_cache/simple/simple_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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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_SIMPLE_SIMPLE_ENTRY_IMPL_H_ 5 #ifndef NET_DISK_CACHE_SIMPLE_SIMPLE_ENTRY_IMPL_H_
6 #define NET_DISK_CACHE_SIMPLE_SIMPLE_ENTRY_IMPL_H_ 6 #define NET_DISK_CACHE_SIMPLE_SIMPLE_ENTRY_IMPL_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 // and it will be set. 88 // and it will be set.
89 void SetKey(const std::string& key); 89 void SetKey(const std::string& key);
90 90
91 // From Entry: 91 // From Entry:
92 void Doom() override; 92 void Doom() override;
93 void Close() override; 93 void Close() override;
94 std::string GetKey() const override; 94 std::string GetKey() const override;
95 base::Time GetLastUsed() const override; 95 base::Time GetLastUsed() const override;
96 base::Time GetLastModified() const override; 96 base::Time GetLastModified() const override;
97 int32_t GetDataSize(int index) const override; 97 int32_t GetDataSize(int index) const override;
98 int64_t GetEntrySize() const override;
98 int ReadData(int stream_index, 99 int ReadData(int stream_index,
99 int offset, 100 int offset,
100 net::IOBuffer* buf, 101 net::IOBuffer* buf,
101 int buf_len, 102 int buf_len,
102 const CompletionCallback& callback) override; 103 const CompletionCallback& callback) override;
103 int WriteData(int stream_index, 104 int WriteData(int stream_index,
104 int offset, 105 int offset,
105 net::IOBuffer* buf, 106 net::IOBuffer* buf,
106 int buf_len, 107 int buf_len,
107 const CompletionCallback& callback, 108 const CompletionCallback& callback,
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after
382 // 1 on disk, to reduce the number of file descriptors and save disk space. 383 // 1 on disk, to reduce the number of file descriptors and save disk space.
383 // This strategy allows stream 1 to change size easily. Since stream 0 is only 384 // This strategy allows stream 1 to change size easily. Since stream 0 is only
384 // used to write HTTP headers, the memory consumption of keeping it in memory 385 // used to write HTTP headers, the memory consumption of keeping it in memory
385 // is acceptable. 386 // is acceptable.
386 scoped_refptr<net::GrowableIOBuffer> stream_0_data_; 387 scoped_refptr<net::GrowableIOBuffer> stream_0_data_;
387 }; 388 };
388 389
389 } // namespace disk_cache 390 } // namespace disk_cache
390 391
391 #endif // NET_DISK_CACHE_SIMPLE_SIMPLE_ENTRY_IMPL_H_ 392 #endif // NET_DISK_CACHE_SIMPLE_SIMPLE_ENTRY_IMPL_H_
OLDNEW
« no previous file with comments | « net/disk_cache/memory/mem_entry_impl.cc ('k') | net/disk_cache/simple/simple_entry_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698