Index: net/tools/disk_cache_memory_test/disk_cache_memory_test.cc |
diff --git a/net/tools/disk_cache_memory_test/disk_cache_memory_test.cc b/net/tools/disk_cache_memory_test/disk_cache_memory_test.cc |
index aafd2caf21636298afa26e103cceb97462a97013..de70b53e98393769069247d65afb3c1ffbf1f87b 100644 |
--- a/net/tools/disk_cache_memory_test/disk_cache_memory_test.cc |
+++ b/net/tools/disk_cache_memory_test/disk_cache_memory_test.cc |
@@ -69,10 +69,7 @@ struct CacheSpec { |
CacheSpec(net::BackendType backend_type, |
net::CacheType cache_type, |
const base::FilePath& path) |
- : backend_type(backend_type), |
- cache_type(cache_type), |
- path(path) { |
- } |
+ : backend_type(backend_type), cache_type(cache_type), path(path) {} |
}; |
void SetSuccessCodeOnCompletion(base::RunLoop* run_loop, |
@@ -91,13 +88,19 @@ scoped_ptr<Backend> CreateAndInitBackend(const CacheSpec& spec) { |
scoped_ptr<Backend> backend; |
bool succeeded = false; |
base::RunLoop run_loop; |
- const net::CompletionCallback callback = base::Bind( |
- &SetSuccessCodeOnCompletion, |
- base::Unretained(&run_loop), |
- base::Unretained(&succeeded)); |
- const int net_error = CreateCacheBackend( |
- spec.cache_type, spec.backend_type, spec.path, 0, false, |
- base::MessageLoopProxy::current(), NULL, &backend, callback); |
+ const net::CompletionCallback callback = |
+ base::Bind(&SetSuccessCodeOnCompletion, |
+ base::Unretained(&run_loop), |
+ base::Unretained(&succeeded)); |
+ const int net_error = CreateCacheBackend(spec.cache_type, |
+ spec.backend_type, |
+ spec.path, |
+ 0, |
+ false, |
+ base::MessageLoopProxy::current(), |
+ NULL, |
+ &backend, |
+ callback); |
if (net_error == net::OK) |
callback.Run(net::OK); |
else |
@@ -110,10 +113,10 @@ scoped_ptr<Backend> CreateAndInitBackend(const CacheSpec& spec) { |
// For the simple cache, the index may not be initialized yet. |
if (spec.backend_type == net::CACHE_BACKEND_SIMPLE) { |
base::RunLoop index_run_loop; |
- const net::CompletionCallback index_callback = base::Bind( |
- &SetSuccessCodeOnCompletion, |
- base::Unretained(&index_run_loop), |
- base::Unretained(&succeeded)); |
+ const net::CompletionCallback index_callback = |
+ base::Bind(&SetSuccessCodeOnCompletion, |
+ base::Unretained(&index_run_loop), |
+ base::Unretained(&succeeded)); |
SimpleBackendImpl* simple_backend = |
static_cast<SimpleBackendImpl*>(backend.get()); |
const int index_net_error = |
@@ -244,13 +247,11 @@ bool CacheMemTest(const ScopedVector<CacheSpec>& specs) { |
void PrintUsage(std::ostream* stream) { |
*stream << "Usage: disk_cache_mem_test " |
<< "--spec-1=<spec> " |
- << "[--spec-2=<spec>]" |
- << std::endl |
+ << "[--spec-2=<spec>]" << std::endl |
<< " with <cache_spec>=<backend_type>:<cache_type>:<cache_path>" |
- << std::endl |
- << " <backend_type>='block_file'|'simple'" << std::endl |
- << " <cache_type>='disk_cache'|'app_cache'" << std::endl |
- << " <cache_path>=file system path" << std::endl; |
+ << std::endl << " <backend_type>='block_file'|'simple'" |
+ << std::endl << " <cache_type>='disk_cache'|'app_cache'" |
+ << std::endl << " <cache_path>=file system path" << std::endl; |
} |
bool ParseAndStoreSpec(const std::string& spec_str, |