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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
53 const std::string& key, | 53 const std::string& key, |
54 const scoped_refptr<base::TaskRunner>& callback_runner, | 54 const scoped_refptr<base::TaskRunner>& callback_runner, |
55 const SynchronousCreationCallback& callback); | 55 const SynchronousCreationCallback& callback); |
56 | 56 |
57 // Deletes an entry without first Opening it. Does not check if there is | 57 // Deletes an entry without first Opening it. Does not check if there is |
58 // already an Entry object in memory holding the open files. Be careful! This | 58 // already an Entry object in memory holding the open files. Be careful! This |
59 // is meant to be used by the Backend::DoomEntry() call. |callback| will be | 59 // is meant to be used by the Backend::DoomEntry() call. |callback| will be |
60 // run by |callback_runner|. | 60 // run by |callback_runner|. |
61 static void DoomEntry(const base::FilePath& path, | 61 static void DoomEntry(const base::FilePath& path, |
62 const std::string& key, | 62 const std::string& key, |
63 scoped_refptr<base::TaskRunner> callback_runner, | 63 const scoped_refptr<base::TaskRunner>& callback_runner, |
rvargas (doing something else)
2013/04/17 19:56:38
this should be a plain pointer
| |
64 const net::CompletionCallback& callback); | 64 const net::CompletionCallback& callback); |
65 | 65 |
66 // N.B. Close(), ReadData() and WriteData() may block on IO. | 66 // N.B. Close(), ReadData() and WriteData() may block on IO. |
67 void Close(); | 67 void Close(); |
68 void ReadData(int index, | 68 void ReadData(int index, |
69 int offset, | 69 int offset, |
70 net::IOBuffer* buf, | 70 net::IOBuffer* buf, |
71 int buf_len, | 71 int buf_len, |
72 const SynchronousOperationCallback& callback); | 72 const SynchronousOperationCallback& callback); |
73 void WriteData(int index, | 73 void WriteData(int index, |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
115 base::Time last_used_; | 115 base::Time last_used_; |
116 base::Time last_modified_; | 116 base::Time last_modified_; |
117 int32 data_size_[kSimpleEntryFileCount]; | 117 int32 data_size_[kSimpleEntryFileCount]; |
118 | 118 |
119 base::PlatformFile files_[kSimpleEntryFileCount]; | 119 base::PlatformFile files_[kSimpleEntryFileCount]; |
120 }; | 120 }; |
121 | 121 |
122 } // namespace disk_cache | 122 } // namespace disk_cache |
123 | 123 |
124 #endif // NET_DISK_CACHE_SIMPLE_SIMPLE_SYNCHRONOUS_ENTRY_H_ | 124 #endif // NET_DISK_CACHE_SIMPLE_SIMPLE_SYNCHRONOUS_ENTRY_H_ |
OLD | NEW |