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

Side by Side Diff: components/profile_metrics/counts.cc

Issue 2479093002: Migrate more files to histogram_macros.h from histogram.h. (Closed)
Patch Set: Created 4 years, 1 month 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 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 "components/profile_metrics/counts.h" 5 #include "components/profile_metrics/counts.h"
6 6
7 #include "base/metrics/histogram.h" 7 #include "base/metrics/histogram_macros.h"
8 8
9 namespace profile_metrics { 9 namespace profile_metrics {
10 10
11 void LogProfileMetricsCounts(const Counts& counts) { 11 void LogProfileMetricsCounts(const Counts& counts) {
12 UMA_HISTOGRAM_COUNTS_100("Profile.NumberOfProfiles", counts.total); 12 UMA_HISTOGRAM_COUNTS_100("Profile.NumberOfProfiles", counts.total);
13 13
14 // Ignore other metrics if we have no profiles. 14 // Ignore other metrics if we have no profiles.
15 if (counts.total > 0) { 15 if (counts.total > 0) {
16 UMA_HISTOGRAM_COUNTS_100("Profile.NumberOfManagedProfiles", 16 UMA_HISTOGRAM_COUNTS_100("Profile.NumberOfManagedProfiles",
17 counts.supervised); 17 counts.supervised);
18 UMA_HISTOGRAM_COUNTS_100("Profile.PercentageOfManagedProfiles", 18 UMA_HISTOGRAM_COUNTS_100("Profile.PercentageOfManagedProfiles",
19 100 * counts.supervised / counts.total); 19 100 * counts.supervised / counts.total);
20 UMA_HISTOGRAM_COUNTS_100("Profile.NumberOfSignedInProfiles", 20 UMA_HISTOGRAM_COUNTS_100("Profile.NumberOfSignedInProfiles",
21 counts.signedin); 21 counts.signedin);
22 UMA_HISTOGRAM_COUNTS_100("Profile.NumberOfUnusedProfiles", counts.unused); 22 UMA_HISTOGRAM_COUNTS_100("Profile.NumberOfUnusedProfiles", counts.unused);
23 UMA_HISTOGRAM_COUNTS_100("Profile.NumberOfSignedInProfilesWithGAIAIcons", 23 UMA_HISTOGRAM_COUNTS_100("Profile.NumberOfSignedInProfilesWithGAIAIcons",
24 counts.gaia_icon); 24 counts.gaia_icon);
25 UMA_HISTOGRAM_COUNTS_100("Profile.NumberOfProfilesWithAuthErrors", 25 UMA_HISTOGRAM_COUNTS_100("Profile.NumberOfProfilesWithAuthErrors",
26 counts.auth_errors); 26 counts.auth_errors);
27 } 27 }
28 } 28 }
29 29
30 } // namespace profile_metrics 30 } // namespace profile_metrics
OLDNEW
« no previous file with comments | « components/policy/core/common/cloud/device_management_service.cc ('k') | components/sync/engine_impl/model_type_registry.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698