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

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

Issue 10854063: Clean-up inline members of nested classes (net/) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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) 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/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"
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 base::Time now = base::Time::Now(); 182 base::Time now = base::Time::Now();
183 node->Data()->last_used = now.ToInternalValue(); 183 node->Data()->last_used = now.ToInternalValue();
184 if (modified) 184 if (modified)
185 node->Data()->last_modified = now.ToInternalValue(); 185 node->Data()->last_modified = now.ToInternalValue();
186 } 186 }
187 187
188 } // namespace 188 } // namespace
189 189
190 namespace disk_cache { 190 namespace disk_cache {
191 191
192 Rankings::ScopedRankingsBlock::ScopedRankingsBlock() : rankings_(NULL) {}
193 // XXX omitting the constructor name crashes clang. reduce & file.
mmenke 2012/08/09 15:13:35 I can make no sense of this comment. Also, should
hans 2012/08/09 15:35:42 I think this can just be removed.
194 Rankings::ScopedRankingsBlock::ScopedRankingsBlock(Rankings* rankings)
195 : rankings_(rankings) {}
196 Rankings::ScopedRankingsBlock::ScopedRankingsBlock(
197 Rankings* rankings, CacheRankingsBlock* node)
198 : scoped_ptr<CacheRankingsBlock>(node), rankings_(rankings) {}
mmenke 2012/08/09 15:13:35 nit: Line breaks between functions.
hans 2012/08/09 15:35:42 Done.
199
192 Rankings::Iterator::Iterator(Rankings* rankings) { 200 Rankings::Iterator::Iterator(Rankings* rankings) {
193 memset(this, 0, sizeof(Iterator)); 201 memset(this, 0, sizeof(Iterator));
194 my_rankings = rankings; 202 my_rankings = rankings;
195 } 203 }
196 204
197 Rankings::Iterator::~Iterator() { 205 Rankings::Iterator::~Iterator() {
198 for (int i = 0; i < 3; i++) 206 for (int i = 0; i < 3; i++)
199 ScopedRankingsBlock(my_rankings, nodes[i]); 207 ScopedRankingsBlock(my_rankings, nodes[i]);
200 } 208 }
201 209
(...skipping 803 matching lines...) Expand 10 before | Expand all | Expand 10 after
1005 void Rankings::DecrementCounter(List list) { 1013 void Rankings::DecrementCounter(List list) {
1006 if (!count_lists_) 1014 if (!count_lists_)
1007 return; 1015 return;
1008 1016
1009 DCHECK(control_data_->sizes[list] > 0); 1017 DCHECK(control_data_->sizes[list] > 0);
1010 if (control_data_->sizes[list] > 0) 1018 if (control_data_->sizes[list] > 0)
1011 control_data_->sizes[list]--; 1019 control_data_->sizes[list]--;
1012 } 1020 }
1013 1021
1014 } // namespace disk_cache 1022 } // namespace disk_cache
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698