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

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

Issue 121643003: Reorganize net/disk_cache into backend specific directories. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase & remediate Created 6 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 | Annotate | Revision Log
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/rankings.h" 5 #include "net/disk_cache/blockfile/rankings.h"
6 6
7 #include "base/metrics/histogram.h" 7 #include "base/metrics/histogram.h"
8 #include "net/disk_cache/backend_impl.h" 8 #include "net/disk_cache/blockfile/backend_impl.h"
9 #include "net/disk_cache/disk_format.h" 9 #include "net/disk_cache/blockfile/disk_format.h"
10 #include "net/disk_cache/entry_impl.h" 10 #include "net/disk_cache/blockfile/entry_impl.h"
11 #include "net/disk_cache/errors.h" 11 #include "net/disk_cache/blockfile/errors.h"
12 #include "net/disk_cache/stress_support.h" 12 #include "net/disk_cache/blockfile/stress_support.h"
13 13
14 // Define BLOCKFILE_BACKEND_IMPL_OBJ to be a disk_cache::BackendImpl* in order 14 // Define BLOCKFILE_BACKEND_IMPL_OBJ to be a disk_cache::BackendImpl* in order
15 // to use the CACHE_UMA histogram macro. 15 // to use the CACHE_UMA histogram macro.
16 #define BLOCKFILE_BACKEND_IMPL_OBJ backend_ 16 #define BLOCKFILE_BACKEND_IMPL_OBJ backend_
17 #include "net/disk_cache/histogram_macros.h" 17 #include "net/disk_cache/blockfile/histogram_macros.h"
18
18 19
19 using base::Time; 20 using base::Time;
20 using base::TimeTicks; 21 using base::TimeTicks;
21 22
22 namespace disk_cache { 23 namespace disk_cache {
23 // This is used by crash_cache.exe to generate unit test files. 24 // This is used by crash_cache.exe to generate unit test files.
24 NET_EXPORT_PRIVATE RankCrashes g_rankings_crash = NO_CRASH; 25 NET_EXPORT_PRIVATE RankCrashes g_rankings_crash = NO_CRASH;
25 } 26 }
26 27
27 namespace { 28 namespace {
(...skipping 889 matching lines...) Expand 10 before | Expand all | Expand 10 after
917 void Rankings::DecrementCounter(List list) { 918 void Rankings::DecrementCounter(List list) {
918 if (!count_lists_) 919 if (!count_lists_)
919 return; 920 return;
920 921
921 DCHECK(control_data_->sizes[list] > 0); 922 DCHECK(control_data_->sizes[list] > 0);
922 if (control_data_->sizes[list] > 0) 923 if (control_data_->sizes[list] > 0)
923 control_data_->sizes[list]--; 924 control_data_->sizes[list]--;
924 } 925 }
925 926
926 } // namespace disk_cache 927 } // namespace disk_cache
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698