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

Unified Diff: net/disk_cache/stress_cache.cc

Issue 15203004: Disk cache: Reference CL for the implementation of file format version 3. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: IndexTable review Created 7 years, 1 month 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 | « net/disk_cache/storage_block_unittest.cc ('k') | net/disk_cache/trace.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/disk_cache/stress_cache.cc
===================================================================
--- net/disk_cache/stress_cache.cc (revision 199883)
+++ net/disk_cache/stress_cache.cc (working copy)
@@ -108,11 +108,12 @@
base::Thread cache_thread("CacheThread");
if (!cache_thread.StartWithOptions(
- base::Thread::Options(MessageLoop::TYPE_IO, 0)))
+ base::Thread::Options(base::MessageLoop::TYPE_IO, 0)))
return;
disk_cache::BackendImpl* cache =
- new disk_cache::BackendImpl(path, mask, cache_thread.message_loop_proxy(),
+ new disk_cache::BackendImpl(path, mask,
+ cache_thread.message_loop_proxy().get(),
NULL);
cache->SetMaxSize(cache_size);
cache->SetFlags(disk_cache::kNoLoadProtection);
@@ -168,7 +169,8 @@
base::snprintf(buffer->data(), kSize,
"i: %d iter: %d, size: %d, truncate: %d ", i, iteration,
size, truncate ? 1 : 0);
- rv = entries[slot]->WriteData(0, 0, buffer, size, cb.callback(), truncate);
+ rv = entries[slot]->WriteData(0, 0, buffer.get(), size, cb.callback(),
+ truncate);
CHECK_EQ(size, cb.GetResult(rv));
if (rand() % 100 > 80) {
@@ -188,11 +190,11 @@
bool g_crashing = false;
// RunSoon() and CrashCallback() reference each other, unfortunately.
-void RunSoon(MessageLoop* target_loop);
+void RunSoon(base::MessageLoop* target_loop);
void CrashCallback() {
// Keep trying to run.
- RunSoon(MessageLoop::current());
+ RunSoon(base::MessageLoop::current());
if (g_crashing)
return;
@@ -210,7 +212,7 @@
}
}
-void RunSoon(MessageLoop* target_loop) {
+void RunSoon(base::MessageLoop* target_loop) {
const base::TimeDelta kTaskDelay = base::TimeDelta::FromSeconds(10);
target_loop->PostDelayedTask(
FROM_HERE, base::Bind(&CrashCallback), kTaskDelay);
@@ -275,7 +277,7 @@
// Some time for the memory manager to flush stuff.
base::PlatformThread::Sleep(base::TimeDelta::FromSeconds(3));
- MessageLoop message_loop(MessageLoop::TYPE_IO);
+ base::MessageLoop message_loop(base::MessageLoop::TYPE_IO);
char* end;
long int iteration = strtol(argv[1], &end, 0);
« no previous file with comments | « net/disk_cache/storage_block_unittest.cc ('k') | net/disk_cache/trace.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698