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

Unified Diff: net/disk_cache/blockfile/entry_impl_v3.h

Issue 266243004: Clang format slam. Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: net/disk_cache/blockfile/entry_impl_v3.h
diff --git a/net/disk_cache/blockfile/entry_impl_v3.h b/net/disk_cache/blockfile/entry_impl_v3.h
index 6be0c7108756addc3ad1a132838b70baf74d4ab4..605e03d49a2254a5ef22b95eae3b49878ec173b2 100644
--- a/net/disk_cache/blockfile/entry_impl_v3.h
+++ b/net/disk_cache/blockfile/entry_impl_v3.h
@@ -20,9 +20,8 @@ class SparseControlV3;
// This class implements the Entry interface. An object of this
// class represents a single entry on the cache.
-class NET_EXPORT_PRIVATE EntryImplV3
- : public Entry,
- public base::RefCounted<EntryImplV3> {
+class NET_EXPORT_PRIVATE EntryImplV3 : public Entry,
+ public base::RefCounted<EntryImplV3> {
friend class base::RefCounted<EntryImplV3>;
// friend class SparseControlV3;
public:
@@ -83,35 +82,52 @@ class NET_EXPORT_PRIVATE EntryImplV3
virtual base::Time GetLastUsed() const OVERRIDE;
virtual base::Time GetLastModified() const OVERRIDE;
virtual int32 GetDataSize(int index) const OVERRIDE;
- virtual int ReadData(int index, int offset, IOBuffer* buf, int buf_len,
+ virtual int ReadData(int index,
+ int offset,
+ IOBuffer* buf,
+ int buf_len,
const CompletionCallback& callback) OVERRIDE;
- virtual int WriteData(int index, int offset, IOBuffer* buf, int buf_len,
+ virtual int WriteData(int index,
+ int offset,
+ IOBuffer* buf,
+ int buf_len,
const CompletionCallback& callback,
bool truncate) OVERRIDE;
- virtual int ReadSparseData(int64 offset, IOBuffer* buf, int buf_len,
+ virtual int ReadSparseData(int64 offset,
+ IOBuffer* buf,
+ int buf_len,
const CompletionCallback& callback) OVERRIDE;
- virtual int WriteSparseData(int64 offset, IOBuffer* buf, int buf_len,
+ virtual int WriteSparseData(int64 offset,
+ IOBuffer* buf,
+ int buf_len,
const CompletionCallback& callback) OVERRIDE;
- virtual int GetAvailableRange(int64 offset, int len, int64* start,
+ virtual int GetAvailableRange(int64 offset,
+ int len,
+ int64* start,
const CompletionCallback& callback) OVERRIDE;
virtual bool CouldBeSparse() const OVERRIDE;
virtual void CancelSparseIO() OVERRIDE;
virtual int ReadyForSparseIO(const CompletionCallback& callback) OVERRIDE;
private:
- enum {
- kNumStreams = 3
- };
+ enum { kNumStreams = 3 };
class UserBuffer;
virtual ~EntryImplV3();
// Do all the work for ReadDataImpl and WriteDataImpl. Implemented as
// separate functions to make logging of results simpler.
- int InternalReadData(int index, int offset, IOBuffer* buf,
- int buf_len, const CompletionCallback& callback);
- int InternalWriteData(int index, int offset, IOBuffer* buf, int buf_len,
- const CompletionCallback& callback, bool truncate);
+ int InternalReadData(int index,
+ int offset,
+ IOBuffer* buf,
+ int buf_len,
+ const CompletionCallback& callback);
+ int InternalWriteData(int index,
+ int offset,
+ IOBuffer* buf,
+ int buf_len,
+ const CompletionCallback& callback,
+ bool truncate);
// Initializes the storage for an internal or external data block.
bool CreateDataBlock(int index, int size);
@@ -185,16 +201,16 @@ class NET_EXPORT_PRIVATE EntryImplV3
// Logs this entry to the internal trace buffer.
void Log(const char* msg);
- scoped_ptr<EntryRecord> entry_; // Basic record for this entry.
+ scoped_ptr<EntryRecord> entry_; // Basic record for this entry.
scoped_ptr<ShortEntryRecord> short_entry_; // Valid for evicted entries.
- base::WeakPtr<BackendImplV3> backend_; // Back pointer to the cache.
+ base::WeakPtr<BackendImplV3> backend_; // Back pointer to the cache.
scoped_ptr<UserBuffer> user_buffers_[kNumStreams]; // Stores user data.
- mutable std::string key_; // Copy of the key.
+ mutable std::string key_; // Copy of the key.
Addr address_;
int unreported_size_[kNumStreams]; // Bytes not reported yet to the backend.
- bool doomed_; // True if this entry was removed from the cache.
+ bool doomed_; // True if this entry was removed from the cache.
bool read_only_;
- bool dirty_; // True if there is something to write.
+ bool dirty_; // True if there is something to write.
bool modified_;
// scoped_ptr<SparseControlV3> sparse_; // Support for sparse entries.

Powered by Google App Engine
This is Rietveld 408576698