| 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 "net/disk_cache/blockfile/backend_impl_v3.h" | 5 #include "net/disk_cache/blockfile/backend_impl_v3.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
| 9 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
| 10 #include "base/files/file_util.h" | 10 #include "base/files/file_util.h" |
| (...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 223 } | 223 } |
| 224 | 224 |
| 225 bool BackendImplV3::IsLoaded() const { | 225 bool BackendImplV3::IsLoaded() const { |
| 226 if (user_flags_ & NO_LOAD_PROTECTION) | 226 if (user_flags_ & NO_LOAD_PROTECTION) |
| 227 return false; | 227 return false; |
| 228 | 228 |
| 229 return user_load_; | 229 return user_load_; |
| 230 } | 230 } |
| 231 | 231 |
| 232 std::string BackendImplV3::HistogramName(const char* name) const { | 232 std::string BackendImplV3::HistogramName(const char* name) const { |
| 233 static const char* names[] = { "Http", "", "Media", "AppCache", "Shader" }; | 233 static const char* const names[] = { |
| 234 "Http", "", "Media", "AppCache", "Shader" }; |
| 234 DCHECK_NE(cache_type_, net::MEMORY_CACHE); | 235 DCHECK_NE(cache_type_, net::MEMORY_CACHE); |
| 235 return base::StringPrintf("DiskCache3.%s_%s", name, names[cache_type_]); | 236 return base::StringPrintf("DiskCache3.%s_%s", name, names[cache_type_]); |
| 236 } | 237 } |
| 237 | 238 |
| 238 base::WeakPtr<BackendImplV3> BackendImplV3::GetWeakPtr() { | 239 base::WeakPtr<BackendImplV3> BackendImplV3::GetWeakPtr() { |
| 239 return ptr_factory_.GetWeakPtr(); | 240 return ptr_factory_.GetWeakPtr(); |
| 240 } | 241 } |
| 241 | 242 |
| 242 #if defined(V3_NOT_JUST_YET_READY) | 243 #if defined(V3_NOT_JUST_YET_READY) |
| 243 // We want to remove biases from some histograms so we only send data once per | 244 // We want to remove biases from some histograms so we only send data once per |
| (...skipping 1282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1526 } | 1527 } |
| 1527 | 1528 |
| 1528 void BackendImplV3::OnExternalCacheHit(const std::string& key) { | 1529 void BackendImplV3::OnExternalCacheHit(const std::string& key) { |
| 1529 NOTIMPLEMENTED(); | 1530 NOTIMPLEMENTED(); |
| 1530 } | 1531 } |
| 1531 | 1532 |
| 1532 void BackendImplV3::CleanupCache() { | 1533 void BackendImplV3::CleanupCache() { |
| 1533 } | 1534 } |
| 1534 | 1535 |
| 1535 } // namespace disk_cache | 1536 } // namespace disk_cache |
| OLD | NEW |