OLD | NEW |
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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 int buf_len, | 76 int buf_len, |
77 const SynchronousOperationCallback& callback, | 77 const SynchronousOperationCallback& callback, |
78 bool truncate); | 78 bool truncate); |
79 | 79 |
80 const base::FilePath& path() const { return path_; } | 80 const base::FilePath& path() const { return path_; } |
81 std::string key() const { return key_; } | 81 std::string key() const { return key_; } |
82 base::Time last_used() const { return last_used_; } | 82 base::Time last_used() const { return last_used_; } |
83 base::Time last_modified() const { return last_modified_; } | 83 base::Time last_modified() const { return last_modified_; } |
84 int32 data_size(int index) const { return data_size_[index]; } | 84 int32 data_size(int index) const { return data_size_[index]; } |
85 | 85 |
| 86 int64 GetFileSize() const; |
| 87 |
86 private: | 88 private: |
87 SimpleSynchronousEntry( | 89 SimpleSynchronousEntry( |
88 const scoped_refptr<base::TaskRunner>& callback_runner, | 90 const scoped_refptr<base::TaskRunner>& callback_runner, |
89 const base::FilePath& path, | 91 const base::FilePath& path, |
90 const std::string& key); | 92 const std::string& key); |
91 | 93 |
92 // Like Entry, the SimpleSynchronousEntry self releases when Close() is | 94 // Like Entry, the SimpleSynchronousEntry self releases when Close() is |
93 // called. | 95 // called. |
94 ~SimpleSynchronousEntry(); | 96 ~SimpleSynchronousEntry(); |
95 | 97 |
(...skipping 10 matching lines...) Expand all Loading... |
106 base::Time last_used_; | 108 base::Time last_used_; |
107 base::Time last_modified_; | 109 base::Time last_modified_; |
108 int32 data_size_[kSimpleEntryFileCount]; | 110 int32 data_size_[kSimpleEntryFileCount]; |
109 | 111 |
110 base::PlatformFile files_[kSimpleEntryFileCount]; | 112 base::PlatformFile files_[kSimpleEntryFileCount]; |
111 }; | 113 }; |
112 | 114 |
113 } // namespace disk_cache | 115 } // namespace disk_cache |
114 | 116 |
115 #endif // NET_DISK_CACHE_SIMPLE_SIMPLE_SYNCHRONOUS_ENTRY_H_ | 117 #endif // NET_DISK_CACHE_SIMPLE_SIMPLE_SYNCHRONOUS_ENTRY_H_ |
OLD | NEW |