OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |