| OLD | NEW |
| 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 "chrome/browser/prerender/prerender_histograms.h" | 5 #include "chrome/browser/prerender/prerender_histograms.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/format_macros.h" | 9 #include "base/format_macros.h" |
| 10 #include "base/metrics/histogram.h" | 10 #include "base/metrics/histogram.h" |
| (...skipping 418 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 429 } else { | 429 } else { |
| 430 UMA_HISTOGRAM_CUSTOM_COUNTS("Prerender.NetworkBytes.Wasted", | 430 UMA_HISTOGRAM_CUSTOM_COUNTS("Prerender.NetworkBytes.Wasted", |
| 431 prerender_bytes, | 431 prerender_bytes, |
| 432 kHistogramMin, | 432 kHistogramMin, |
| 433 kHistogramMax, | 433 kHistogramMax, |
| 434 kBucketCount); | 434 kBucketCount); |
| 435 } | 435 } |
| 436 UMA_HISTOGRAM_CUSTOM_COUNTS("Prerender.NetworkBytes.TotalForProfile", | 436 UMA_HISTOGRAM_CUSTOM_COUNTS("Prerender.NetworkBytes.TotalForProfile", |
| 437 profile_bytes, | 437 profile_bytes, |
| 438 kHistogramMin, | 438 kHistogramMin, |
| 439 kHistogramMax, | 439 1000000000, // 1G |
| 440 kBucketCount); | 440 kBucketCount); |
| 441 } | 441 } |
| 442 | 442 |
| 443 uint8 PrerenderHistograms::GetCurrentExperimentId() const { | 443 uint8 PrerenderHistograms::GetCurrentExperimentId() const { |
| 444 if (!WithinWindow()) | 444 if (!WithinWindow()) |
| 445 return kNoExperiment; | 445 return kNoExperiment; |
| 446 return last_experiment_id_; | 446 return last_experiment_id_; |
| 447 } | 447 } |
| 448 | 448 |
| 449 bool PrerenderHistograms::IsOriginExperimentWash() const { | 449 bool PrerenderHistograms::IsOriginExperimentWash() const { |
| 450 if (!WithinWindow()) | 450 if (!WithinWindow()) |
| 451 return false; | 451 return false; |
| 452 return origin_experiment_wash_; | 452 return origin_experiment_wash_; |
| 453 } | 453 } |
| 454 | 454 |
| 455 } // namespace prerender | 455 } // namespace prerender |
| OLD | NEW |