OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "content/browser/appcache/appcache_disk_cache.h" | 5 #include "content/browser/appcache/appcache_disk_cache.h" |
6 | 6 |
7 #include <limits> | 7 #include <limits> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
310 return net::ERR_IO_PENDING; | 310 return net::ERR_IO_PENDING; |
311 } | 311 } |
312 | 312 |
313 if (!disk_cache_) | 313 if (!disk_cache_) |
314 return net::ERR_FAILED; | 314 return net::ERR_FAILED; |
315 | 315 |
316 return ActiveCall::DoomEntry(weak_factory_.GetWeakPtr(), key, callback); | 316 return ActiveCall::DoomEntry(weak_factory_.GetWeakPtr(), key, callback); |
317 } | 317 } |
318 | 318 |
319 AppCacheDiskCache::AppCacheDiskCache(bool use_simple_cache) | 319 AppCacheDiskCache::AppCacheDiskCache(bool use_simple_cache) |
320 : use_simple_cache_(use_simple_cache), | 320 : AppCacheDiskCacheInterface("DiskCache.AppCache"), |
| 321 use_simple_cache_(use_simple_cache), |
321 is_disabled_(false), | 322 is_disabled_(false), |
322 is_waiting_to_initialize_(false), | 323 is_waiting_to_initialize_(false), |
323 weak_factory_(this) { | 324 weak_factory_(this) {} |
324 } | |
325 | 325 |
326 AppCacheDiskCache::PendingCall::PendingCall() | 326 AppCacheDiskCache::PendingCall::PendingCall() |
327 : call_type(CREATE), | 327 : call_type(CREATE), |
328 key(0), | 328 key(0), |
329 entry(NULL) { | 329 entry(NULL) { |
330 } | 330 } |
331 | 331 |
332 AppCacheDiskCache::PendingCall::PendingCall( | 332 AppCacheDiskCache::PendingCall::PendingCall( |
333 PendingCallType call_type, | 333 PendingCallType call_type, |
334 int64_t key, | 334 int64_t key, |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
400 NOTREACHED(); | 400 NOTREACHED(); |
401 break; | 401 break; |
402 } | 402 } |
403 if (rv != net::ERR_IO_PENDING) | 403 if (rv != net::ERR_IO_PENDING) |
404 iter->callback.Run(rv); | 404 iter->callback.Run(rv); |
405 } | 405 } |
406 pending_calls_.clear(); | 406 pending_calls_.clear(); |
407 } | 407 } |
408 | 408 |
409 } // namespace content | 409 } // namespace content |
OLD | NEW |