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