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

Side by Side Diff: net/disk_cache/simple/simple_backend_impl.h

Issue 22882009: Flush the SimpleBackendImpl's SWP in tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 4 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « net/disk_cache/disk_cache_test_base.cc ('k') | net/disk_cache/simple/simple_backend_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_BACKEND_IMPL_H_ 5 #ifndef NET_DISK_CACHE_SIMPLE_SIMPLE_BACKEND_IMPL_H_
6 #define NET_DISK_CACHE_SIMPLE_SIMPLE_BACKEND_IMPL_H_ 6 #define NET_DISK_CACHE_SIMPLE_SIMPLE_BACKEND_IMPL_H_
7 7
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 // Sets the maximum size for the total amount of data stored by this instance. 57 // Sets the maximum size for the total amount of data stored by this instance.
58 bool SetMaxSize(int max_bytes); 58 bool SetMaxSize(int max_bytes);
59 59
60 // Returns the maximum file size permitted in this backend. 60 // Returns the maximum file size permitted in this backend.
61 int GetMaxFileSize() const; 61 int GetMaxFileSize() const;
62 62
63 // Removes |entry| from the |active_entries_| set, forcing future Open/Create 63 // Removes |entry| from the |active_entries_| set, forcing future Open/Create
64 // operations to construct a new object. 64 // operations to construct a new object.
65 void OnDeactivated(const SimpleEntryImpl* entry); 65 void OnDeactivated(const SimpleEntryImpl* entry);
66 66
67 // Flush our SequencedWorkerPool.
68 static void FlushWorkerPoolForTesting();
69
67 // Backend: 70 // Backend:
68 virtual net::CacheType GetCacheType() const OVERRIDE; 71 virtual net::CacheType GetCacheType() const OVERRIDE;
69 virtual int32 GetEntryCount() const OVERRIDE; 72 virtual int32 GetEntryCount() const OVERRIDE;
70 virtual int OpenEntry(const std::string& key, Entry** entry, 73 virtual int OpenEntry(const std::string& key, Entry** entry,
71 const CompletionCallback& callback) OVERRIDE; 74 const CompletionCallback& callback) OVERRIDE;
72 virtual int CreateEntry(const std::string& key, Entry** entry, 75 virtual int CreateEntry(const std::string& key, Entry** entry,
73 const CompletionCallback& callback) OVERRIDE; 76 const CompletionCallback& callback) OVERRIDE;
74 virtual int DoomEntry(const std::string& key, 77 virtual int DoomEntry(const std::string& key,
75 const CompletionCallback& callback) OVERRIDE; 78 const CompletionCallback& callback) OVERRIDE;
76 virtual int DoomAllEntries(const CompletionCallback& callback) OVERRIDE; 79 virtual int DoomAllEntries(const CompletionCallback& callback) OVERRIDE;
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 // TODO(gavinp): Store the entry_hash in SimpleEntryImpl, and index this map 176 // TODO(gavinp): Store the entry_hash in SimpleEntryImpl, and index this map
174 // by hash. This will save memory, and make IndexReadyForDoom easier. 177 // by hash. This will save memory, and make IndexReadyForDoom easier.
175 EntryMap active_entries_; 178 EntryMap active_entries_;
176 179
177 net::NetLog* const net_log_; 180 net::NetLog* const net_log_;
178 }; 181 };
179 182
180 } // namespace disk_cache 183 } // namespace disk_cache
181 184
182 #endif // NET_DISK_CACHE_SIMPLE_SIMPLE_BACKEND_IMPL_H_ 185 #endif // NET_DISK_CACHE_SIMPLE_SIMPLE_BACKEND_IMPL_H_
OLDNEW
« no previous file with comments | « net/disk_cache/disk_cache_test_base.cc ('k') | net/disk_cache/simple/simple_backend_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698