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 "components/password_manager/core/browser/password_manager_metrics_util
.h" | 5 #include "components/password_manager/core/browser/password_manager_metrics_util
.h" |
6 | 6 |
7 #include "base/macros.h" | 7 #include "base/macros.h" |
8 #include "base/metrics/histogram_macros.h" | 8 #include "base/metrics/histogram_macros.h" |
9 #include "base/numerics/safe_conversions.h" | 9 #include "base/numerics/safe_conversions.h" |
10 #include "base/rand_util.h" | 10 #include "base/rand_util.h" |
11 #include "base/strings/string_number_conversions.h" | 11 #include "base/strings/string_number_conversions.h" |
12 #include "base/strings/string_util.h" | 12 #include "base/strings/string_util.h" |
13 #include "base/time/time.h" | 13 #include "base/time/time.h" |
14 #include "base/values.h" | 14 #include "base/values.h" |
15 #include "components/password_manager/core/common/password_manager_pref_names.h" | 15 #include "components/password_manager/core/common/password_manager_pref_names.h" |
16 #include "components/prefs/pref_service.h" | 16 #include "components/prefs/pref_service.h" |
17 #include "components/prefs/scoped_user_pref_update.h" | 17 #include "components/prefs/scoped_user_pref_update.h" |
18 #include "url/gurl.h" | 18 #include "url/gurl.h" |
19 | 19 |
20 using base::ListValue; | 20 using base::ListValue; |
21 using base::FundamentalValue; | 21 using base::Value; |
22 | 22 |
23 namespace password_manager { | 23 namespace password_manager { |
24 | 24 |
25 namespace metrics_util { | 25 namespace metrics_util { |
26 | 26 |
27 void LogUMAHistogramBoolean(const std::string& name, bool sample) { | 27 void LogUMAHistogramBoolean(const std::string& name, bool sample) { |
28 // Note: This leaks memory, which is expected behavior. | 28 // Note: This leaks memory, which is expected behavior. |
29 base::HistogramBase* histogram = base::BooleanHistogram::FactoryGet( | 29 base::HistogramBase* histogram = base::BooleanHistogram::FactoryGet( |
30 name, base::Histogram::kUmaTargetedHistogramFlag); | 30 name, base::Histogram::kUmaTargetedHistogramFlag); |
31 histogram->AddBoolean(sample); | 31 histogram->AddBoolean(sample); |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
119 case CREDENTIAL_MANAGER_GET_MEDIATED: | 119 case CREDENTIAL_MANAGER_GET_MEDIATED: |
120 UMA_HISTOGRAM_ENUMERATION("PasswordManager.GetMediated", result, | 120 UMA_HISTOGRAM_ENUMERATION("PasswordManager.GetMediated", result, |
121 CREDENTIAL_MANAGER_GET_COUNT); | 121 CREDENTIAL_MANAGER_GET_COUNT); |
122 break; | 122 break; |
123 } | 123 } |
124 } | 124 } |
125 | 125 |
126 } // namespace metrics_util | 126 } // namespace metrics_util |
127 | 127 |
128 } // namespace password_manager | 128 } // namespace password_manager |
OLD | NEW |