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/files/file_path.h" | 7 #include "base/files/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 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
100 AVATAR_PIZZA, | 100 AVATAR_PIZZA, |
101 AVATAR_SOCCER, | 101 AVATAR_SOCCER, |
102 AVATAR_BURGER, | 102 AVATAR_BURGER, |
103 AVATAR_CAT, | 103 AVATAR_CAT, |
104 AVATAR_CUPCAKE, // 20 | 104 AVATAR_CUPCAKE, // 20 |
105 AVATAR_DOG, | 105 AVATAR_DOG, |
106 AVATAR_HORSE, | 106 AVATAR_HORSE, |
107 AVATAR_MARGARITA, | 107 AVATAR_MARGARITA, |
108 AVATAR_NOTE, | 108 AVATAR_NOTE, |
109 AVATAR_SUN_CLOUD, | 109 AVATAR_SUN_CLOUD, |
110 AVATAR_UNKNOWN, // 26 | 110 AVATAR_PLACEHOLDER, |
111 AVATAR_GAIA, // 27 | 111 AVATAR_UNKNOWN, // 27 |
| 112 AVATAR_GAIA, // 28 |
112 NUM_PROFILE_AVATAR_METRICS | 113 NUM_PROFILE_AVATAR_METRICS |
113 }; | 114 }; |
114 | 115 |
115 void ProfileMetrics::UpdateReportedProfilesStatistics(ProfileManager* manager) { | 116 void ProfileMetrics::UpdateReportedProfilesStatistics(ProfileManager* manager) { |
116 ProfileCounts counts; | 117 ProfileCounts counts; |
117 if (CountProfileInformation(manager, &counts)) { | 118 if (CountProfileInformation(manager, &counts)) { |
118 int limited_total = counts.total; | 119 int limited_total = counts.total; |
119 int limited_signedin = counts.signedin; | 120 int limited_signedin = counts.signedin; |
120 if (limited_total > kMaximumReportedProfileCount) { | 121 if (limited_total > kMaximumReportedProfileCount) { |
121 limited_total = kMaximumReportedProfileCount + 1; | 122 limited_total = kMaximumReportedProfileCount + 1; |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
230 break; | 231 break; |
231 case 23: | 232 case 23: |
232 icon_name = AVATAR_MARGARITA; | 233 icon_name = AVATAR_MARGARITA; |
233 break; | 234 break; |
234 case 24: | 235 case 24: |
235 icon_name = AVATAR_NOTE; | 236 icon_name = AVATAR_NOTE; |
236 break; | 237 break; |
237 case 25: | 238 case 25: |
238 icon_name = AVATAR_SUN_CLOUD; | 239 icon_name = AVATAR_SUN_CLOUD; |
239 break; | 240 break; |
240 case 27: | 241 case 26: |
| 242 icon_name = AVATAR_PLACEHOLDER; |
| 243 break; |
| 244 case 28: |
241 icon_name = AVATAR_GAIA; | 245 icon_name = AVATAR_GAIA; |
242 break; | 246 break; |
243 default: // We should never actually get here. | 247 default: // We should never actually get here. |
244 NOTREACHED(); | 248 NOTREACHED(); |
245 break; | 249 break; |
246 } | 250 } |
247 UMA_HISTOGRAM_ENUMERATION("Profile.Avatar", icon_name, | 251 UMA_HISTOGRAM_ENUMERATION("Profile.Avatar", icon_name, |
248 NUM_PROFILE_AVATAR_METRICS); | 252 NUM_PROFILE_AVATAR_METRICS); |
249 } | 253 } |
250 | 254 |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
301 UMA_HISTOGRAM_ENUMERATION("Profile.SyncSignIn", | 305 UMA_HISTOGRAM_ENUMERATION("Profile.SyncSignIn", |
302 GetProfileType(profile_path), | 306 GetProfileType(profile_path), |
303 NUM_PROFILE_TYPE_METRICS); | 307 NUM_PROFILE_TYPE_METRICS); |
304 } | 308 } |
305 | 309 |
306 void ProfileMetrics::LogProfileUpdate(const base::FilePath& profile_path) { | 310 void ProfileMetrics::LogProfileUpdate(const base::FilePath& profile_path) { |
307 UMA_HISTOGRAM_ENUMERATION("Profile.Update", | 311 UMA_HISTOGRAM_ENUMERATION("Profile.Update", |
308 GetProfileType(profile_path), | 312 GetProfileType(profile_path), |
309 NUM_PROFILE_TYPE_METRICS); | 313 NUM_PROFILE_TYPE_METRICS); |
310 } | 314 } |
OLD | NEW |