OLD | NEW |
---|---|
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/profiles/profile_metrics.h" | 5 #include "chrome/browser/profiles/profile_metrics.h" |
6 | 6 |
7 #include "base/file_path.h" | 7 #include "base/file_path.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/metrics/histogram.h" | 9 #include "base/metrics/histogram.h" |
10 #include "chrome/browser/browser_process.h" | 10 #include "chrome/browser/browser_process.h" |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
106 break; | 106 break; |
107 case 23: | 107 case 23: |
108 icon_name = AVATAR_MARGARITA; | 108 icon_name = AVATAR_MARGARITA; |
109 break; | 109 break; |
110 case 24: | 110 case 24: |
111 icon_name = AVATAR_NOTE; | 111 icon_name = AVATAR_NOTE; |
112 break; | 112 break; |
113 case 25: | 113 case 25: |
114 icon_name = AVATAR_SUN_CLOUD; | 114 icon_name = AVATAR_SUN_CLOUD; |
115 break; | 115 break; |
116 case 27: | |
117 icon_name = AVATAR_GAIA; | |
118 break; | |
116 default: // We should never actually get here, but just in case | 119 default: // We should never actually get here, but just in case |
Ilya Sherman
2011/12/03 02:31:13
nit: Perhaps add a NOTREACHED() stmt here?
rpetterson
2011/12/05 20:27:14
Done.
| |
117 icon_name = AVATAR_UNKNOWN; | 120 icon_name = AVATAR_UNKNOWN; |
118 break; | 121 break; |
119 } | 122 } |
120 UMA_HISTOGRAM_ENUMERATION("Profile.Avatar", icon_name, | 123 UMA_HISTOGRAM_ENUMERATION("Profile.Avatar", icon_name, |
121 NUM_PROFILE_AVATAR_METRICS); | 124 NUM_PROFILE_AVATAR_METRICS); |
122 } | 125 } |
123 | 126 |
124 void ProfileMetrics::LogProfileOpenMethod(ProfileOpen metric) { | 127 void ProfileMetrics::LogProfileOpenMethod(ProfileOpen metric) { |
125 DCHECK(metric < NUM_PROFILE_OPEN_METRICS); | 128 DCHECK(metric < NUM_PROFILE_OPEN_METRICS); |
126 UMA_HISTOGRAM_ENUMERATION("Profile.OpenMethod", metric, | 129 UMA_HISTOGRAM_ENUMERATION("Profile.OpenMethod", metric, |
(...skipping 30 matching lines...) Expand all Loading... | |
157 UMA_HISTOGRAM_ENUMERATION("Profile.Update", | 160 UMA_HISTOGRAM_ENUMERATION("Profile.Update", |
158 GetProfileType(profile_path), | 161 GetProfileType(profile_path), |
159 NUM_PROFILE_TYPE_METRICS); | 162 NUM_PROFILE_TYPE_METRICS); |
160 } | 163 } |
161 | 164 |
162 void ProfileMetrics::LogProfileSyncSignIn(FilePath& profile_path) { | 165 void ProfileMetrics::LogProfileSyncSignIn(FilePath& profile_path) { |
163 UMA_HISTOGRAM_ENUMERATION("Profile.SyncSignIn", | 166 UMA_HISTOGRAM_ENUMERATION("Profile.SyncSignIn", |
164 GetProfileType(profile_path), | 167 GetProfileType(profile_path), |
165 NUM_PROFILE_TYPE_METRICS); | 168 NUM_PROFILE_TYPE_METRICS); |
166 } | 169 } |
170 | |
171 void ProfileMetrics::LogProfileSwitchGaia(ProfileGaia metric) { | |
172 UMA_HISTOGRAM_ENUMERATION("Profile.SwitchGaiaPhotoSettings", | |
173 metric, | |
174 NUM_PROFILE_GAIA_METRICS); | |
175 } | |
OLD | NEW |