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

Side by Side Diff: content/browser/appcache/appcache_disk_cache.cc

Issue 1874893002: Convert //content/browser from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « content/browser/appcache/appcache_disk_cache.h ('k') | content/browser/appcache/appcache_disk_cache_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698