Index: net/disk_cache/cache_creator.cc |
diff --git a/net/disk_cache/cache_creator.cc b/net/disk_cache/cache_creator.cc |
index 866df10e37278cf6e97047d30013eb2167fc0e2b..bc4730718b849fccc4d935b66b9a93e8e946a002 100644 |
--- a/net/disk_cache/cache_creator.cc |
+++ b/net/disk_cache/cache_creator.cc |
@@ -24,9 +24,14 @@ namespace { |
// finished. |
class CacheCreator { |
public: |
- CacheCreator(const base::FilePath& path, bool force, int max_bytes, |
- net::CacheType type, net::BackendType backend_type, uint32 flags, |
- base::MessageLoopProxy* thread, net::NetLog* net_log, |
+ CacheCreator(const base::FilePath& path, |
+ bool force, |
+ int max_bytes, |
+ net::CacheType type, |
+ net::BackendType backend_type, |
+ uint32 flags, |
+ base::MessageLoopProxy* thread, |
+ net::NetLog* net_log, |
scoped_ptr<disk_cache::Backend>* backend, |
const net::CompletionCallback& callback); |
@@ -56,12 +61,16 @@ class CacheCreator { |
DISALLOW_COPY_AND_ASSIGN(CacheCreator); |
}; |
-CacheCreator::CacheCreator( |
- const base::FilePath& path, bool force, int max_bytes, |
- net::CacheType type, net::BackendType backend_type, uint32 flags, |
- base::MessageLoopProxy* thread, net::NetLog* net_log, |
- scoped_ptr<disk_cache::Backend>* backend, |
- const net::CompletionCallback& callback) |
+CacheCreator::CacheCreator(const base::FilePath& path, |
+ bool force, |
+ int max_bytes, |
+ net::CacheType type, |
+ net::BackendType backend_type, |
+ uint32 flags, |
+ base::MessageLoopProxy* thread, |
+ net::NetLog* net_log, |
+ scoped_ptr<disk_cache::Backend>* backend, |
+ const net::CompletionCallback& callback) |
: path_(path), |
force_(force), |
retry_(false), |
@@ -88,14 +97,14 @@ int CacheCreator::Run() { |
(backend_type_ == net::CACHE_BACKEND_DEFAULT && |
kSimpleBackendIsDefault)) { |
disk_cache::SimpleBackendImpl* simple_cache = |
- new disk_cache::SimpleBackendImpl(path_, max_bytes_, type_, |
- thread_.get(), net_log_); |
+ new disk_cache::SimpleBackendImpl( |
+ path_, max_bytes_, type_, thread_.get(), net_log_); |
created_cache_.reset(simple_cache); |
return simple_cache->Init( |
base::Bind(&CacheCreator::OnIOComplete, base::Unretained(this))); |
} |
- // Avoid references to blockfile functions on Android to reduce binary size. |
+// Avoid references to blockfile functions on Android to reduce binary size. |
#if defined(OS_ANDROID) |
return net::ERR_FAILED; |
#else |
@@ -118,8 +127,7 @@ void CacheCreator::DoCallback(int result) { |
#ifndef USE_TRACING_CACHE_BACKEND |
*backend_ = created_cache_.Pass(); |
#else |
- *backend_.reset( |
- new disk_cache::TracingCacheBackend(created_cache_.Pass())); |
+ *backend_.reset(new disk_cache::TracingCacheBackend(created_cache_.Pass())); |
#endif |
} else { |
LOG(ERROR) << "Unable to create cache"; |
@@ -156,8 +164,10 @@ int CreateCacheBackend(net::CacheType type, |
net::BackendType backend_type, |
const base::FilePath& path, |
int max_bytes, |
- bool force, base::MessageLoopProxy* thread, |
- net::NetLog* net_log, scoped_ptr<Backend>* backend, |
+ bool force, |
+ base::MessageLoopProxy* thread, |
+ net::NetLog* net_log, |
+ scoped_ptr<Backend>* backend, |
const net::CompletionCallback& callback) { |
DCHECK(!callback.is_null()); |
if (type == net::MEMORY_CACHE) { |
@@ -165,9 +175,16 @@ int CreateCacheBackend(net::CacheType type, |
return *backend ? net::OK : net::ERR_FAILED; |
} |
DCHECK(thread); |
- CacheCreator* creator = new CacheCreator(path, force, max_bytes, type, |
- backend_type, kNone, |
- thread, net_log, backend, callback); |
+ CacheCreator* creator = new CacheCreator(path, |
+ force, |
+ max_bytes, |
+ type, |
+ backend_type, |
+ kNone, |
+ thread, |
+ net_log, |
+ backend, |
+ callback); |
return creator->Run(); |
} |