| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/safe_browsing/srt_fetcher_win.h" | 5 #include "chrome/browser/safe_browsing/srt_fetcher_win.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 | 8 |
| 9 #include <memory> | 9 #include <memory> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 353 // See UMA_HISTOGRAM_LONG_TIMES for the parameters to |FactoryTimeGet|. | 353 // See UMA_HISTOGRAM_LONG_TIMES for the parameters to |FactoryTimeGet|. |
| 354 auto histogram = base::Histogram::FactoryTimeGet( | 354 auto histogram = base::Histogram::FactoryTimeGet( |
| 355 FullName(name), base::TimeDelta::FromMilliseconds(1), | 355 FullName(name), base::TimeDelta::FromMilliseconds(1), |
| 356 base::TimeDelta::FromHours(1), 100, kUmaHistogramFlag); | 356 base::TimeDelta::FromHours(1), 100, kUmaHistogramFlag); |
| 357 if (histogram) | 357 if (histogram) |
| 358 histogram->AddTime(sample); | 358 histogram->AddTime(sample); |
| 359 } | 359 } |
| 360 | 360 |
| 361 void RecordMemoryKBHistogram(const std::string& name, Sample sample) const { | 361 void RecordMemoryKBHistogram(const std::string& name, Sample sample) const { |
| 362 // See UMA_HISTOGRAM_MEMORY_KB for the parameters to |FactoryGet|. | 362 // See UMA_HISTOGRAM_MEMORY_KB for the parameters to |FactoryGet|. |
| 363 auto histogram = base::LinearHistogram::FactoryGet( | 363 auto histogram = base::Histogram::FactoryGet(FullName(name), 1000, 500000, |
| 364 FullName(name), 1000, 500000, 50, kUmaHistogramFlag); | 364 50, kUmaHistogramFlag); |
| 365 if (histogram) | 365 if (histogram) |
| 366 histogram->Add(sample); | 366 histogram->Add(sample); |
| 367 } | 367 } |
| 368 | 368 |
| 369 void RecordSparseHistogram(const std::string& name, Sample sample) const { | 369 void RecordSparseHistogram(const std::string& name, Sample sample) const { |
| 370 auto histogram = | 370 auto histogram = |
| 371 base::SparseHistogram::FactoryGet(FullName(name), kUmaHistogramFlag); | 371 base::SparseHistogram::FactoryGet(FullName(name), kUmaHistogramFlag); |
| 372 if (histogram) | 372 if (histogram) |
| 373 histogram->Add(sample); | 373 histogram->Add(sample); |
| 374 } | 374 } |
| (...skipping 493 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 868 KEY_QUERY_VALUE); | 868 KEY_QUERY_VALUE); |
| 869 | 869 |
| 870 return srt_cleaner_key.Valid() && srt_cleaner_key.GetValueCount() > 0; | 870 return srt_cleaner_key.Valid() && srt_cleaner_key.GetValueCount() > 0; |
| 871 } | 871 } |
| 872 | 872 |
| 873 void SetSwReporterTestingDelegate(SwReporterTestingDelegate* delegate) { | 873 void SetSwReporterTestingDelegate(SwReporterTestingDelegate* delegate) { |
| 874 g_testing_delegate_ = delegate; | 874 g_testing_delegate_ = delegate; |
| 875 } | 875 } |
| 876 | 876 |
| 877 } // namespace safe_browsing | 877 } // namespace safe_browsing |
| OLD | NEW |