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

Side by Side Diff: net/disk_cache/simple/simple_backend_impl.cc

Issue 12794003: Initialize the simple cache backend at runtime. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: rebased to latest, auto-merged net.gyp Created 7 years, 8 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 unified diff | Download patch
« no previous file with comments | « net/disk_cache/simple/simple_backend_impl.h ('k') | net/net.gyp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "net/disk_cache/simple/simple_backend_impl.h" 5 #include "net/disk_cache/simple/simple_backend_impl.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/file_util.h" 9 #include "base/file_util.h"
10 #include "base/location.h" 10 #include "base/location.h"
(...skipping 24 matching lines...) Expand all
35 callback.Run(result); 35 callback.Run(result);
36 } 36 }
37 37
38 } // namespace 38 } // namespace
39 39
40 namespace disk_cache { 40 namespace disk_cache {
41 41
42 // static 42 // static
43 int SimpleBackendImpl::CreateBackend( 43 int SimpleBackendImpl::CreateBackend(
44 const FilePath& full_path, 44 const FilePath& full_path,
45 bool force,
46 int max_bytes, 45 int max_bytes,
47 net::CacheType type, 46 net::CacheType type,
48 uint32 flags, 47 uint32 flags,
49 scoped_refptr<base::TaskRunner> cache_thread, 48 scoped_refptr<base::TaskRunner> cache_thread,
50 net::NetLog* net_log, 49 net::NetLog* net_log,
51 Backend** backend, 50 Backend** backend,
52 const CompletionCallback& callback) { 51 const CompletionCallback& callback) {
53 // TODO(gavinp): Use the |net_log|. 52 // TODO(gavinp): Use the |net_log|.
54 DCHECK_EQ(net::DISK_CACHE, type); 53 DCHECK_EQ(net::DISK_CACHE, type);
55 FilePath simple_cache_path = 54 FilePath simple_cache_path =
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 base::Bind(callback, result)); 170 base::Bind(callback, result));
172 } else { 171 } else {
173 io_thread->PostTask(FROM_HERE, 172 io_thread->PostTask(FROM_HERE,
174 base::Bind( 173 base::Bind(
175 &DeleteBackendImpl, 174 &DeleteBackendImpl,
176 backend, callback, result)); 175 backend, callback, result));
177 } 176 }
178 } 177 }
179 178
180 } // namespace disk_cache 179 } // namespace disk_cache
OLDNEW
« no previous file with comments | « net/disk_cache/simple/simple_backend_impl.h ('k') | net/net.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698