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

Side by Side Diff: net/disk_cache/tracing_cache_backend.cc

Issue 20737002: Change the API of disk_cache::CreateCacheBackend to use scoped_ptr (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix new test Created 7 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « net/disk_cache/tracing_cache_backend.h ('k') | net/http/http_cache.h » ('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/tracing_cache_backend.h" 5 #include "net/disk_cache/tracing_cache_backend.h"
6 6
7 #include "net/base/net_errors.h" 7 #include "net/base/net_errors.h"
8 8
9 namespace disk_cache { 9 namespace disk_cache {
10 10
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 cb.Run(result); 169 cb.Run(result);
170 } 170 }
171 } 171 }
172 172
173 EntryProxy::~EntryProxy() { 173 EntryProxy::~EntryProxy() {
174 if (backend_.get()) { 174 if (backend_.get()) {
175 backend_->OnDeleteEntry(entry_); 175 backend_->OnDeleteEntry(entry_);
176 } 176 }
177 } 177 }
178 178
179 TracingCacheBackend::TracingCacheBackend(Backend* backend) 179 TracingCacheBackend::TracingCacheBackend(scoped_ptr<Backend> backend)
180 : backend_(backend) { 180 : backend_(backend.Pass()) {
181 } 181 }
182 182
183 TracingCacheBackend::~TracingCacheBackend() { 183 TracingCacheBackend::~TracingCacheBackend() {
184 } 184 }
185 185
186 net::CacheType TracingCacheBackend::GetCacheType() const { 186 net::CacheType TracingCacheBackend::GetCacheType() const {
187 return backend_->GetCacheType(); 187 return backend_->GetCacheType();
188 } 188 }
189 189
190 int32 TracingCacheBackend::GetEntryCount() const { 190 int32 TracingCacheBackend::GetEntryCount() const {
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
308 308
309 void TracingCacheBackend::GetStats(StatsItems* stats) { 309 void TracingCacheBackend::GetStats(StatsItems* stats) {
310 return backend_->GetStats(stats); 310 return backend_->GetStats(stats);
311 } 311 }
312 312
313 void TracingCacheBackend::OnExternalCacheHit(const std::string& key) { 313 void TracingCacheBackend::OnExternalCacheHit(const std::string& key) {
314 return backend_->OnExternalCacheHit(key); 314 return backend_->OnExternalCacheHit(key);
315 } 315 }
316 316
317 } // namespace disk_cache 317 } // namespace disk_cache
OLDNEW
« no previous file with comments | « net/disk_cache/tracing_cache_backend.h ('k') | net/http/http_cache.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698