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 21 matching lines...) Expand all Loading... |
32 | 32 |
33 void Cancel() { | 33 void Cancel() { |
34 appcache_diskcache_ = NULL; | 34 appcache_diskcache_ = NULL; |
35 } | 35 } |
36 | 36 |
37 void Callback(int rv) { | 37 void Callback(int rv) { |
38 if (appcache_diskcache_) | 38 if (appcache_diskcache_) |
39 appcache_diskcache_->OnCreateBackendComplete(rv); | 39 appcache_diskcache_->OnCreateBackendComplete(rv); |
40 } | 40 } |
41 | 41 |
42 scoped_ptr<disk_cache::Backend> backend_ptr_; // Accessed directly. | 42 std::unique_ptr<disk_cache::Backend> backend_ptr_; // Accessed directly. |
43 | 43 |
44 private: | 44 private: |
45 friend class base::RefCounted<CreateBackendCallbackShim>; | 45 friend class base::RefCounted<CreateBackendCallbackShim>; |
46 | 46 |
47 ~CreateBackendCallbackShim() { | 47 ~CreateBackendCallbackShim() { |
48 } | 48 } |
49 | 49 |
50 AppCacheDiskCache* appcache_diskcache_; // Unowned pointer. | 50 AppCacheDiskCache* appcache_diskcache_; // Unowned pointer. |
51 }; | 51 }; |
52 | 52 |
(...skipping 347 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 |