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

Side by Side Diff: net/disk_cache/blockfile/stats.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) 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/stats.h" 5 #include "net/disk_cache/blockfile/stats.h"
6 6
7 #include "base/format_macros.h" 7 #include "base/format_macros.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/metrics/histogram_samples.h" 9 #include "base/metrics/histogram_samples.h"
10 #include "base/strings/string_util.h" 10 #include "base/strings/string_util.h"
11 #include "base/strings/stringprintf.h" 11 #include "base/strings/stringprintf.h"
12 12
13 namespace { 13 namespace {
14 14
15 const int32 kDiskSignature = 0xF01427E0; 15 const int32 kDiskSignature = 0xF01427E0;
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after
303 int Stats::GetRatio(Counters hit, Counters miss) const { 303 int Stats::GetRatio(Counters hit, Counters miss) const {
304 int64 ratio = GetCounter(hit) * 100; 304 int64 ratio = GetCounter(hit) * 100;
305 if (!ratio) 305 if (!ratio)
306 return 0; 306 return 0;
307 307
308 ratio /= (GetCounter(hit) + GetCounter(miss)); 308 ratio /= (GetCounter(hit) + GetCounter(miss));
309 return static_cast<int>(ratio); 309 return static_cast<int>(ratio);
310 } 310 }
311 311
312 } // namespace disk_cache 312 } // namespace disk_cache
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698