| 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);
|
|
|