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

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

Issue 82913011: LOG(INFO) tidying in net/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: revert dns_fuzz_stub changes Created 7 years 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/cert/x509_util_ios.cc ('k') | net/disk_cache/simple/simple_index_file.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/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/disk_format.h"
10 #include "net/disk_cache/entry_impl.h" 10 #include "net/disk_cache/entry_impl.h"
(...skipping 877 matching lines...) Expand 10 before | Expand all | Expand 10 after
888 *other->Data() = *node->Data(); 888 *other->Data() = *node->Data();
889 } 889 }
890 } 890 }
891 } 891 }
892 892
893 void Rankings::InvalidateIterators(CacheRankingsBlock* node) { 893 void Rankings::InvalidateIterators(CacheRankingsBlock* node) {
894 CacheAddr address = node->address().value(); 894 CacheAddr address = node->address().value();
895 for (IteratorList::iterator it = iterators_.begin(); it != iterators_.end(); 895 for (IteratorList::iterator it = iterators_.begin(); it != iterators_.end();
896 ++it) { 896 ++it) {
897 if (it->first == address) { 897 if (it->first == address) {
898 DLOG(INFO) << "Invalidating iterator at 0x" << std::hex << address; 898 DVLOG(0) << "Invalidating iterator at 0x" << std::hex << address;
899 it->second->Discard(); 899 it->second->Discard();
900 } 900 }
901 } 901 }
902 } 902 }
903 903
904 void Rankings::IncrementCounter(List list) { 904 void Rankings::IncrementCounter(List list) {
905 if (!count_lists_) 905 if (!count_lists_)
906 return; 906 return;
907 907
908 DCHECK(control_data_->sizes[list] < kint32max); 908 DCHECK(control_data_->sizes[list] < kint32max);
909 if (control_data_->sizes[list] < kint32max) 909 if (control_data_->sizes[list] < kint32max)
910 control_data_->sizes[list]++; 910 control_data_->sizes[list]++;
911 } 911 }
912 912
913 void Rankings::DecrementCounter(List list) { 913 void Rankings::DecrementCounter(List list) {
914 if (!count_lists_) 914 if (!count_lists_)
915 return; 915 return;
916 916
917 DCHECK(control_data_->sizes[list] > 0); 917 DCHECK(control_data_->sizes[list] > 0);
918 if (control_data_->sizes[list] > 0) 918 if (control_data_->sizes[list] > 0)
919 control_data_->sizes[list]--; 919 control_data_->sizes[list]--;
920 } 920 }
921 921
922 } // namespace disk_cache 922 } // namespace disk_cache
OLDNEW
« no previous file with comments | « net/cert/x509_util_ios.cc ('k') | net/disk_cache/simple/simple_index_file.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698