Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/prefs/tracked/tracked_preference_helper.h" | 5 #include "components/prefs_tracker/tracked_preference_helper.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "base/metrics/histogram.h" | 8 #include "base/metrics/histogram.h" |
| 9 | 9 |
| 10 TrackedPreferenceHelper::TrackedPreferenceHelper( | 10 TrackedPreferenceHelper::TrackedPreferenceHelper( |
| 11 const std::string& pref_path, | 11 const std::string& pref_path, |
| 12 size_t reporting_id, | 12 size_t reporting_id, |
| 13 size_t reporting_ids_count, | 13 size_t reporting_ids_count, |
| 14 PrefHashFilter::EnforcementLevel enforcement_level, | 14 PrefHashFilter::EnforcementLevel enforcement_level, |
| 15 PrefHashFilter::ValueType value_type) | 15 PrefHashFilter::ValueType value_type) |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 100 reporting_id_, reporting_ids_count_); | 100 reporting_id_, reporting_ids_count_); |
| 101 break; | 101 break; |
| 102 } | 102 } |
| 103 } | 103 } |
| 104 | 104 |
| 105 void TrackedPreferenceHelper::ReportSplitPreferenceChangedCount( | 105 void TrackedPreferenceHelper::ReportSplitPreferenceChangedCount( |
| 106 size_t count) const { | 106 size_t count) const { |
| 107 // The histogram below is an expansion of the UMA_HISTOGRAM_COUNTS_100 macro | 107 // The histogram below is an expansion of the UMA_HISTOGRAM_COUNTS_100 macro |
| 108 // adapted to allow for a dynamically suffixed histogram name. | 108 // adapted to allow for a dynamically suffixed histogram name. |
| 109 // Note: The factory creates and owns the histogram. | 109 // Note: The factory creates and owns the histogram. |
| 110 base::HistogramBase* histogram = | 110 base::HistogramBase* histogram = base::LinearHistogram::FactoryGet( |
| 111 base::LinearHistogram::FactoryGet( | 111 "Settings.TrackedSplitPreferenceChanged." + pref_path_, 1, |
|
gab
2015/07/23 21:41:16
This was easier to read IMO and is how it's writte
Jitu( very slow this week)
2015/07/24 09:09:23
Done.
As i used git format cl command this piece
| |
| 112 "Settings.TrackedSplitPreferenceChanged." + pref_path_, | 112 100, // Allow counts up to 100. |
| 113 1, | 113 101, base::HistogramBase::kUmaTargetedHistogramFlag); |
| 114 100, // Allow counts up to 100. | |
| 115 101, | |
| 116 base::HistogramBase::kUmaTargetedHistogramFlag); | |
| 117 histogram->Add(count); | 114 histogram->Add(count); |
| 118 } | 115 } |
| OLD | NEW |