Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(9)

Side by Side Diff: components/password_manager/core/browser/password_manager_metrics_util.cc

Issue 2666093002: Remove base::FundamentalValue (Closed)
Patch Set: Rebase Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/metrics/user_metrics.h" 9 #include "base/metrics/user_metrics.h"
10 #include "base/numerics/safe_conversions.h" 10 #include "base/numerics/safe_conversions.h"
11 #include "base/rand_util.h" 11 #include "base/rand_util.h"
12 #include "base/strings/string_number_conversions.h" 12 #include "base/strings/string_number_conversions.h"
13 #include "base/strings/string_util.h" 13 #include "base/strings/string_util.h"
14 #include "base/time/time.h" 14 #include "base/time/time.h"
15 #include "base/values.h" 15 #include "base/values.h"
16 #include "components/password_manager/core/common/password_manager_pref_names.h" 16 #include "components/password_manager/core/common/password_manager_pref_names.h"
17 #include "components/prefs/pref_service.h" 17 #include "components/prefs/pref_service.h"
18 #include "components/prefs/scoped_user_pref_update.h" 18 #include "components/prefs/scoped_user_pref_update.h"
19 #include "url/gurl.h" 19 #include "url/gurl.h"
20 20
21 using base::ListValue; 21 using base::ListValue;
22 using base::FundamentalValue; 22 using base::Value;
23 23
24 namespace password_manager { 24 namespace password_manager {
25 25
26 namespace metrics_util { 26 namespace metrics_util {
27 27
28 void LogUMAHistogramBoolean(const std::string& name, bool sample) { 28 void LogUMAHistogramBoolean(const std::string& name, bool sample) {
29 // Note: This leaks memory, which is expected behavior. 29 // Note: This leaks memory, which is expected behavior.
30 base::HistogramBase* histogram = base::BooleanHistogram::FactoryGet( 30 base::HistogramBase* histogram = base::BooleanHistogram::FactoryGet(
31 name, base::Histogram::kUmaTargetedHistogramFlag); 31 name, base::Histogram::kUmaTargetedHistogramFlag);
32 histogram->AddBoolean(sample); 32 histogram->AddBoolean(sample);
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 // Always record 'true': this is a counter of the number of times the warning 165 // Always record 'true': this is a counter of the number of times the warning
166 // is shown, to gather metrics such as the number of times the warning is 166 // is shown, to gather metrics such as the number of times the warning is
167 // shown per million page loads. 167 // shown per million page loads.
168 UMA_HISTOGRAM_BOOLEAN( 168 UMA_HISTOGRAM_BOOLEAN(
169 "PasswordManager.ShowedFormNotSecureWarningOnCurrentNavigation", true); 169 "PasswordManager.ShowedFormNotSecureWarningOnCurrentNavigation", true);
170 } 170 }
171 171
172 } // namespace metrics_util 172 } // namespace metrics_util
173 173
174 } // namespace password_manager 174 } // namespace password_manager
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698