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

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

Issue 15203004: Disk cache: Reference CL for the implementation of file format version 3. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years, 6 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/rankings.h ('k') | net/disk_cache/storage_block.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) 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/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/backend_impl.h"
9 #include "net/disk_cache/disk_format.h"
9 #include "net/disk_cache/entry_impl.h" 10 #include "net/disk_cache/entry_impl.h"
10 #include "net/disk_cache/errors.h" 11 #include "net/disk_cache/errors.h"
11 #include "net/disk_cache/histogram_macros.h" 12 #include "net/disk_cache/histogram_macros.h"
12 #include "net/disk_cache/stress_support.h" 13 #include "net/disk_cache/stress_support.h"
13 14
14 using base::Time; 15 using base::Time;
15 using base::TimeTicks; 16 using base::TimeTicks;
16 17
17 namespace disk_cache { 18 namespace disk_cache {
18 // This is used by crash_cache.exe to generate unit test files. 19 // This is used by crash_cache.exe to generate unit test files.
(...skipping 893 matching lines...) Expand 10 before | Expand all | Expand 10 after
912 void Rankings::DecrementCounter(List list) { 913 void Rankings::DecrementCounter(List list) {
913 if (!count_lists_) 914 if (!count_lists_)
914 return; 915 return;
915 916
916 DCHECK(control_data_->sizes[list] > 0); 917 DCHECK(control_data_->sizes[list] > 0);
917 if (control_data_->sizes[list] > 0) 918 if (control_data_->sizes[list] > 0)
918 control_data_->sizes[list]--; 919 control_data_->sizes[list]--;
919 } 920 }
920 921
921 } // namespace disk_cache 922 } // namespace disk_cache
OLDNEW
« no previous file with comments | « net/disk_cache/rankings.h ('k') | net/disk_cache/storage_block.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698