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

Side by Side Diff: net/disk_cache/blockfile/backend_impl_v3.cc

Issue 885443002: Roll Chrome into Mojo. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Rebase to ToT mojo Created 5 years, 10 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
« no previous file with comments | « net/disk_cache/blockfile/backend_impl.cc ('k') | net/disk_cache/blockfile/backend_worker_v3.cc » ('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) 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
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
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
OLDNEW
« no previous file with comments | « net/disk_cache/blockfile/backend_impl.cc ('k') | net/disk_cache/blockfile/backend_worker_v3.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698