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

Unified Diff: net/disk_cache/backend_impl.h

Issue 11649028: Add an IO thread index bitmap to disk cache. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remediate Created 7 years, 10 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
« no previous file with comments | « no previous file | net/disk_cache/backend_impl.cc » ('j') | net/disk_cache/backend_impl.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/disk_cache/backend_impl.h
diff --git a/net/disk_cache/backend_impl.h b/net/disk_cache/backend_impl.h
index 91faa83373b510c7ede43ec2914adfb755dd70ea..e97a7b047276ec0b31087dc4fa3795d29b8dd5ae 100644
--- a/net/disk_cache/backend_impl.h
+++ b/net/disk_cache/backend_impl.h
@@ -9,7 +9,10 @@
#include "base/file_path.h"
#include "base/hash_tables.h"
+#include "base/memory/ref_counted.h"
+#include "base/message_loop_proxy.h"
#include "base/timer.h"
+#include "net/disk_cache/bitmap.h"
#include "net/disk_cache/block_files.h"
#include "net/disk_cache/disk_cache.h"
#include "net/disk_cache/eviction.h"
@@ -60,7 +63,9 @@ class NET_EXPORT_PRIVATE BackendImpl : public Backend {
// Performs general initialization for this current instance of the cache.
int Init(const CompletionCallback& callback);
- // Performs the actual initialization and final cleanup on destruction.
+ // Performs the actual initialization and final cleanup on destruction. If
+ // |async_thread| is non null, then |bitmap_| may be initialized on that
rvargas (doing something else) 2013/02/12 01:58:33 I'm guessing the comment is stale now.
+ // thread, otherwise |bitmap_| is left unchanged.
int SyncInit();
void CleanupCache();
@@ -233,6 +238,9 @@ class NET_EXPORT_PRIVATE BackendImpl : public Backend {
// Sets an explicit set of BackendFlags.
void SetFlags(uint32 flags);
+ // Clears the index bitmap for tests.
+ void ClearIndexBitmapForTest();
+
// Clears the counter of references to test handling of corruptions.
void ClearRefCountForTest();
@@ -384,6 +392,8 @@ class NET_EXPORT_PRIVATE BackendImpl : public Backend {
bool first_timer_; // True if the timer has not been called.
bool user_load_; // True if we see a high load coming from the caller.
+ Bitmap index_bitmap_;
+
net::NetLog* net_log_;
Stats stats_; // Usage statistics.
« no previous file with comments | « no previous file | net/disk_cache/backend_impl.cc » ('j') | net/disk_cache/backend_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698