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 343 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
354 mc_status == PrerenderContents::MATCH_COMPLETE_REPLACEMENT || | 354 mc_status == PrerenderContents::MATCH_COMPLETE_REPLACEMENT || |
355 mc_status == PrerenderContents::MATCH_COMPLETE_REPLACEMENT_PENDING) { | 355 mc_status == PrerenderContents::MATCH_COMPLETE_REPLACEMENT_PENDING) { |
356 PREFIXED_HISTOGRAM_ORIGIN_EXPERIMENT( | 356 PREFIXED_HISTOGRAM_ORIGIN_EXPERIMENT( |
357 "FinalStatusMatchComplete", origin, | 357 "FinalStatusMatchComplete", origin, |
358 UMA_HISTOGRAM_ENUMERATION(name, final_status, FINAL_STATUS_MAX)); | 358 UMA_HISTOGRAM_ENUMERATION(name, final_status, FINAL_STATUS_MAX)); |
359 } | 359 } |
360 } | 360 } |
361 | 361 |
362 void PrerenderHistograms::RecordNetworkBytes(Origin origin, | 362 void PrerenderHistograms::RecordNetworkBytes(Origin origin, |
363 bool used, | 363 bool used, |
364 int64 prerender_bytes, | 364 int64_t prerender_bytes, |
365 int64 profile_bytes) { | 365 int64_t profile_bytes) { |
366 const int kHistogramMin = 1; | 366 const int kHistogramMin = 1; |
367 const int kHistogramMax = 100000000; // 100M. | 367 const int kHistogramMax = 100000000; // 100M. |
368 const int kBucketCount = 50; | 368 const int kBucketCount = 50; |
369 | 369 |
370 UMA_HISTOGRAM_CUSTOM_COUNTS("Prerender.NetworkBytesTotalForProfile", | 370 UMA_HISTOGRAM_CUSTOM_COUNTS("Prerender.NetworkBytesTotalForProfile", |
371 profile_bytes, | 371 profile_bytes, |
372 kHistogramMin, | 372 kHistogramMin, |
373 1000000000, // 1G | 373 1000000000, // 1G |
374 kBucketCount); | 374 kBucketCount); |
375 | 375 |
(...skipping 15 matching lines...) Expand all Loading... |
391 } | 391 } |
392 } | 392 } |
393 | 393 |
394 bool PrerenderHistograms::IsOriginWash() const { | 394 bool PrerenderHistograms::IsOriginWash() const { |
395 if (!WithinWindow()) | 395 if (!WithinWindow()) |
396 return false; | 396 return false; |
397 return origin_wash_; | 397 return origin_wash_; |
398 } | 398 } |
399 | 399 |
400 } // namespace prerender | 400 } // namespace prerender |
OLD | NEW |