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

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

Issue 7529043: Rename NET_API to NET_EXPORT, and rename NET_TEST to NET_EXPORT_PRIVATE. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 4 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/entry_impl.h" 9 #include "net/disk_cache/entry_impl.h"
10 #include "net/disk_cache/errors.h" 10 #include "net/disk_cache/errors.h"
11 #include "net/disk_cache/histogram_macros.h" 11 #include "net/disk_cache/histogram_macros.h"
12 12
13 using base::Time; 13 using base::Time;
14 using base::TimeTicks; 14 using base::TimeTicks;
15 15
16 namespace disk_cache { 16 namespace disk_cache {
17 // This is used by crash_cache.exe to generate unit test files. 17 // This is used by crash_cache.exe to generate unit test files.
18 NET_TEST RankCrashes g_rankings_crash = NO_CRASH; 18 NET_EXPORT_PRIVATE RankCrashes g_rankings_crash = NO_CRASH;
19 } 19 }
20 20
21 namespace { 21 namespace {
22 22
23 enum Operation { 23 enum Operation {
24 INSERT = 1, 24 INSERT = 1,
25 REMOVE 25 REMOVE
26 }; 26 };
27 27
28 // This class provides a simple lock for the LRU list of rankings. Whenever an 28 // This class provides a simple lock for the LRU list of rankings. Whenever an
(...skipping 835 matching lines...) Expand 10 before | Expand all | Expand 10 after
864 void Rankings::DecrementCounter(List list) { 864 void Rankings::DecrementCounter(List list) {
865 if (!count_lists_) 865 if (!count_lists_)
866 return; 866 return;
867 867
868 DCHECK(control_data_->sizes[list] > 0); 868 DCHECK(control_data_->sizes[list] > 0);
869 if (control_data_->sizes[list] > 0) 869 if (control_data_->sizes[list] > 0)
870 control_data_->sizes[list]--; 870 control_data_->sizes[list]--;
871 } 871 }
872 872
873 } // namespace disk_cache 873 } // namespace disk_cache
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698