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

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

Issue 13913010: Add Cache size to the Simple Index. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 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) 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_SYNCHRONOUS_ENTRY_H_ 5 #ifndef NET_DISK_CACHE_SIMPLE_SIMPLE_SYNCHRONOUS_ENTRY_H_
6 #define NET_DISK_CACHE_SIMPLE_SIMPLE_SYNCHRONOUS_ENTRY_H_ 6 #define NET_DISK_CACHE_SIMPLE_SIMPLE_SYNCHRONOUS_ENTRY_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/callback_forward.h" 10 #include "base/callback_forward.h"
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 int buf_len, 71 int buf_len,
72 const SynchronousOperationCallback& callback, 72 const SynchronousOperationCallback& callback,
73 bool truncate); 73 bool truncate);
74 74
75 const base::FilePath& path() const { return path_; } 75 const base::FilePath& path() const { return path_; }
76 std::string key() const { return key_; } 76 std::string key() const { return key_; }
77 base::Time last_used() const { return last_used_; } 77 base::Time last_used() const { return last_used_; }
78 base::Time last_modified() const { return last_modified_; } 78 base::Time last_modified() const { return last_modified_; }
79 int32 data_size(int index) const { return data_size_[index]; } 79 int32 data_size(int index) const { return data_size_[index]; }
80 80
81 int64 GetFileSize() const;
gavinp 2013/04/10 10:33:23 Nice.
felipeg 2013/04/10 11:45:35 Done.
gavinp 2013/04/10 14:49:29 Done!
82
81 private: 83 private:
82 SimpleSynchronousEntry( 84 SimpleSynchronousEntry(
83 const scoped_refptr<base::TaskRunner>& callback_runner, 85 const scoped_refptr<base::TaskRunner>& callback_runner,
84 const base::FilePath& path, 86 const base::FilePath& path,
85 const std::string& key); 87 const std::string& key);
86 88
87 // Like Entry, the SimpleSynchronousEntry self releases when Close() is 89 // Like Entry, the SimpleSynchronousEntry self releases when Close() is
88 // called. 90 // called.
89 ~SimpleSynchronousEntry(); 91 ~SimpleSynchronousEntry();
90 92
(...skipping 10 matching lines...) Expand all
101 base::Time last_used_; 103 base::Time last_used_;
102 base::Time last_modified_; 104 base::Time last_modified_;
103 int32 data_size_[kSimpleEntryFileCount]; 105 int32 data_size_[kSimpleEntryFileCount];
104 106
105 base::PlatformFile files_[kSimpleEntryFileCount]; 107 base::PlatformFile files_[kSimpleEntryFileCount];
106 }; 108 };
107 109
108 } // namespace disk_cache 110 } // namespace disk_cache
109 111
110 #endif // NET_DISK_CACHE_SIMPLE_SIMPLE_SYNCHRONOUS_ENTRY_H_ 112 #endif // NET_DISK_CACHE_SIMPLE_SIMPLE_SYNCHRONOUS_ENTRY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698