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

Unified Diff: net/disk_cache/backend_impl.cc

Issue 6339012: More net/ method ordering. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: More done while waiting for previous patch to clear Created 9 years, 11 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 | « net/base/x509_certificate.cc ('k') | net/disk_cache/file_posix.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/disk_cache/backend_impl.cc
diff --git a/net/disk_cache/backend_impl.cc b/net/disk_cache/backend_impl.cc
index 89890e92fbb80be9deb3a9cd87f4287a5b44ef9e..0a6ad7780e08a535dd6d6fb863ba06144af80818 100644
--- a/net/disk_cache/backend_impl.cc
+++ b/net/disk_cache/backend_impl.cc
@@ -344,34 +344,6 @@ int PreferedCacheSize(int64 available) {
// ------------------------------------------------------------------------
-// If the initialization of the cache fails, and force is true, we will discard
-// the whole cache and create a new one. In order to process a potentially large
-// number of files, we'll rename the cache folder to old_ + original_name +
-// number, (located on the same parent folder), and spawn a worker thread to
-// delete all the files on all the stale cache folders. The whole process can
-// still fail if we are not able to rename the cache folder (for instance due to
-// a sharing violation), and in that case a cache for this profile (on the
-// desired path) cannot be created.
-//
-// Static.
-int BackendImpl::CreateBackend(const FilePath& full_path, bool force,
- int max_bytes, net::CacheType type,
- uint32 flags, base::MessageLoopProxy* thread,
- net::NetLog* net_log, Backend** backend,
- CompletionCallback* callback) {
- DCHECK(callback);
- CacheCreator* creator = new CacheCreator(full_path, force, max_bytes, type,
- flags, thread, net_log, backend,
- callback);
- // This object will self-destroy when finished.
- return creator->Run();
-}
-
-int BackendImpl::Init(CompletionCallback* callback) {
- background_queue_.Init(callback);
- return net::ERR_IO_PENDING;
-}
-
BackendImpl::BackendImpl(const FilePath& path,
base::MessageLoopProxy* cache_thread,
net::NetLog* net_log)
@@ -436,7 +408,33 @@ BackendImpl::~BackendImpl() {
}
}
-// ------------------------------------------------------------------------
+// If the initialization of the cache fails, and force is true, we will discard
+// the whole cache and create a new one. In order to process a potentially large
+// number of files, we'll rename the cache folder to old_ + original_name +
+// number, (located on the same parent folder), and spawn a worker thread to
+// delete all the files on all the stale cache folders. The whole process can
+// still fail if we are not able to rename the cache folder (for instance due to
+// a sharing violation), and in that case a cache for this profile (on the
+// desired path) cannot be created.
+//
+// Static.
+int BackendImpl::CreateBackend(const FilePath& full_path, bool force,
+ int max_bytes, net::CacheType type,
+ uint32 flags, base::MessageLoopProxy* thread,
+ net::NetLog* net_log, Backend** backend,
+ CompletionCallback* callback) {
+ DCHECK(callback);
+ CacheCreator* creator = new CacheCreator(full_path, force, max_bytes, type,
+ flags, thread, net_log, backend,
+ callback);
+ // This object will self-destroy when finished.
+ return creator->Run();
+}
+
+int BackendImpl::Init(CompletionCallback* callback) {
+ background_queue_.Init(callback);
+ return net::ERR_IO_PENDING;
+}
int BackendImpl::SyncInit() {
DCHECK(!init_);
« no previous file with comments | « net/base/x509_certificate.cc ('k') | net/disk_cache/file_posix.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698