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

Unified Diff: net/disk_cache/mem_backend_impl.h

Issue 6085013: Start reordering the methods in headers in net/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 11 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/mem_backend_impl.h
diff --git a/net/disk_cache/mem_backend_impl.h b/net/disk_cache/mem_backend_impl.h
index c78c670158f97891d8cbba5315893da5eff13468..9b920ac59494ef70b03e8ff0a8dbb9fc23fdfef4 100644
--- a/net/disk_cache/mem_backend_impl.h
+++ b/net/disk_cache/mem_backend_impl.h
@@ -34,25 +34,6 @@ class MemBackendImpl : public Backend {
// Performs general initialization for this current instance of the cache.
bool Init();
- // Backend interface.
- virtual int32 GetEntryCount() const;
- virtual int OpenEntry(const std::string& key, Entry** entry,
- CompletionCallback* callback);
- virtual int CreateEntry(const std::string& key, Entry** entry,
- CompletionCallback* callback);
- virtual int DoomEntry(const std::string& key, CompletionCallback* callback);
- virtual int DoomAllEntries(CompletionCallback* callback);
- virtual int DoomEntriesBetween(const base::Time initial_time,
- const base::Time end_time,
- CompletionCallback* callback);
- virtual int DoomEntriesSince(const base::Time initial_time,
- CompletionCallback* callback);
- virtual int OpenNextEntry(void** iter, Entry** next_entry,
- CompletionCallback* callback);
- virtual void EndEnumeration(void** iter);
- virtual void GetStats(
- std::vector<std::pair<std::string, std::string> >* stats) {}
-
// Sets the maximum size for the total amount of data stored by this instance.
bool SetMaxSize(int max_bytes);
@@ -77,7 +58,28 @@ class MemBackendImpl : public Backend {
// MemEntryImpl to remove a child entry from the ranking list.
void RemoveFromRankingList(MemEntryImpl* entry);
+ // Backend interface.
+ virtual int32 GetEntryCount() const;
+ virtual int OpenEntry(const std::string& key, Entry** entry,
+ CompletionCallback* callback);
+ virtual int CreateEntry(const std::string& key, Entry** entry,
+ CompletionCallback* callback);
+ virtual int DoomEntry(const std::string& key, CompletionCallback* callback);
+ virtual int DoomAllEntries(CompletionCallback* callback);
+ virtual int DoomEntriesBetween(const base::Time initial_time,
+ const base::Time end_time,
+ CompletionCallback* callback);
+ virtual int DoomEntriesSince(const base::Time initial_time,
+ CompletionCallback* callback);
+ virtual int OpenNextEntry(void** iter, Entry** next_entry,
+ CompletionCallback* callback);
+ virtual void EndEnumeration(void** iter);
+ virtual void GetStats(
+ std::vector<std::pair<std::string, std::string> >* stats) {}
+
private:
+ typedef base::hash_map<std::string, MemEntryImpl*> EntryMap;
+
// Old Backend interface.
bool OpenEntry(const std::string& key, Entry** entry);
bool CreateEntry(const std::string& key, Entry** entry);
@@ -97,8 +99,6 @@ class MemBackendImpl : public Backend {
void AddStorageSize(int32 bytes);
void SubstractStorageSize(int32 bytes);
- typedef base::hash_map<std::string, MemEntryImpl*> EntryMap;
-
EntryMap entries_;
MemRankings rankings_; // Rankings to be able to trim the cache.
int32 max_size_; // Maximum data size for this instance.

Powered by Google App Engine
This is Rietveld 408576698