| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_BLOCKFILE_ENTRY_IMPL_V3_H_ | 5 #ifndef NET_DISK_CACHE_BLOCKFILE_ENTRY_IMPL_V3_H_ |
| 6 #define NET_DISK_CACHE_BLOCKFILE_ENTRY_IMPL_V3_H_ | 6 #define NET_DISK_CACHE_BLOCKFILE_ENTRY_IMPL_V3_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 | 70 |
| 71 // Logs a begin event and enables logging for the EntryImplV3. Will also cause | 71 // Logs a begin event and enables logging for the EntryImplV3. Will also cause |
| 72 // an end event to be logged on destruction. The EntryImplV3 must have its key | 72 // an end event to be logged on destruction. The EntryImplV3 must have its key |
| 73 // initialized before this is called. |created| is true if the Entry was | 73 // initialized before this is called. |created| is true if the Entry was |
| 74 // created rather than opened. | 74 // created rather than opened. |
| 75 void BeginLogging(net::NetLog* net_log, bool created); | 75 void BeginLogging(net::NetLog* net_log, bool created); |
| 76 | 76 |
| 77 const net::BoundNetLog& net_log() const; | 77 const net::BoundNetLog& net_log() const; |
| 78 | 78 |
| 79 // Entry interface. | 79 // Entry interface. |
| 80 virtual void Doom() OVERRIDE; | 80 virtual void Doom() override; |
| 81 virtual void Close() OVERRIDE; | 81 virtual void Close() override; |
| 82 virtual std::string GetKey() const OVERRIDE; | 82 virtual std::string GetKey() const override; |
| 83 virtual base::Time GetLastUsed() const OVERRIDE; | 83 virtual base::Time GetLastUsed() const override; |
| 84 virtual base::Time GetLastModified() const OVERRIDE; | 84 virtual base::Time GetLastModified() const override; |
| 85 virtual int32 GetDataSize(int index) const OVERRIDE; | 85 virtual int32 GetDataSize(int index) const override; |
| 86 virtual int ReadData(int index, int offset, IOBuffer* buf, int buf_len, | 86 virtual int ReadData(int index, int offset, IOBuffer* buf, int buf_len, |
| 87 const CompletionCallback& callback) OVERRIDE; | 87 const CompletionCallback& callback) override; |
| 88 virtual int WriteData(int index, int offset, IOBuffer* buf, int buf_len, | 88 virtual int WriteData(int index, int offset, IOBuffer* buf, int buf_len, |
| 89 const CompletionCallback& callback, | 89 const CompletionCallback& callback, |
| 90 bool truncate) OVERRIDE; | 90 bool truncate) override; |
| 91 virtual int ReadSparseData(int64 offset, IOBuffer* buf, int buf_len, | 91 virtual int ReadSparseData(int64 offset, IOBuffer* buf, int buf_len, |
| 92 const CompletionCallback& callback) OVERRIDE; | 92 const CompletionCallback& callback) override; |
| 93 virtual int WriteSparseData(int64 offset, IOBuffer* buf, int buf_len, | 93 virtual int WriteSparseData(int64 offset, IOBuffer* buf, int buf_len, |
| 94 const CompletionCallback& callback) OVERRIDE; | 94 const CompletionCallback& callback) override; |
| 95 virtual int GetAvailableRange(int64 offset, int len, int64* start, | 95 virtual int GetAvailableRange(int64 offset, int len, int64* start, |
| 96 const CompletionCallback& callback) OVERRIDE; | 96 const CompletionCallback& callback) override; |
| 97 virtual bool CouldBeSparse() const OVERRIDE; | 97 virtual bool CouldBeSparse() const override; |
| 98 virtual void CancelSparseIO() OVERRIDE; | 98 virtual void CancelSparseIO() override; |
| 99 virtual int ReadyForSparseIO(const CompletionCallback& callback) OVERRIDE; | 99 virtual int ReadyForSparseIO(const CompletionCallback& callback) override; |
| 100 | 100 |
| 101 private: | 101 private: |
| 102 enum { | 102 enum { |
| 103 kNumStreams = 3 | 103 kNumStreams = 3 |
| 104 }; | 104 }; |
| 105 class UserBuffer; | 105 class UserBuffer; |
| 106 | 106 |
| 107 virtual ~EntryImplV3(); | 107 virtual ~EntryImplV3(); |
| 108 | 108 |
| 109 // Do all the work for ReadDataImpl and WriteDataImpl. Implemented as | 109 // Do all the work for ReadDataImpl and WriteDataImpl. Implemented as |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 199 // scoped_ptr<SparseControlV3> sparse_; // Support for sparse entries. | 199 // scoped_ptr<SparseControlV3> sparse_; // Support for sparse entries. |
| 200 | 200 |
| 201 net::BoundNetLog net_log_; | 201 net::BoundNetLog net_log_; |
| 202 | 202 |
| 203 DISALLOW_COPY_AND_ASSIGN(EntryImplV3); | 203 DISALLOW_COPY_AND_ASSIGN(EntryImplV3); |
| 204 }; | 204 }; |
| 205 | 205 |
| 206 } // namespace disk_cache | 206 } // namespace disk_cache |
| 207 | 207 |
| 208 #endif // NET_DISK_CACHE_BLOCKFILE_ENTRY_IMPL_V3_H_ | 208 #endif // NET_DISK_CACHE_BLOCKFILE_ENTRY_IMPL_V3_H_ |
| OLD | NEW |