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 311 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
322 break; | 322 break; |
323 } | 323 } |
324 UMA_HISTOGRAM_ENUMERATION("Profile.Avatar", icon_name, | 324 UMA_HISTOGRAM_ENUMERATION("Profile.Avatar", icon_name, |
325 NUM_PROFILE_AVATAR_METRICS); | 325 NUM_PROFILE_AVATAR_METRICS); |
326 } | 326 } |
327 | 327 |
328 void ProfileMetrics::LogProfileDeleteUser(ProfileDelete metric) { | 328 void ProfileMetrics::LogProfileDeleteUser(ProfileDelete metric) { |
329 DCHECK(metric < NUM_DELETE_PROFILE_METRICS); | 329 DCHECK(metric < NUM_DELETE_PROFILE_METRICS); |
330 UMA_HISTOGRAM_ENUMERATION("Profile.DeleteProfileAction", metric, | 330 UMA_HISTOGRAM_ENUMERATION("Profile.DeleteProfileAction", metric, |
331 NUM_DELETE_PROFILE_METRICS); | 331 NUM_DELETE_PROFILE_METRICS); |
332 UMA_HISTOGRAM_ENUMERATION("Profile.NetUserCount", PROFILE_DELETED, | 332 if (metric != DELETE_PROFILE_USER_MANAGER_SHOW_WARNING && |
333 NUM_PROFILE_NET_METRICS); | 333 metric != DELETE_PROFILE_SETTINGS_SHOW_WARNING) { |
| 334 // If a user was actually deleted, update the net user count. |
| 335 UMA_HISTOGRAM_ENUMERATION("Profile.NetUserCount", PROFILE_DELETED, |
| 336 NUM_PROFILE_NET_METRICS); |
| 337 } |
334 } | 338 } |
335 | 339 |
336 void ProfileMetrics::LogProfileOpenMethod(ProfileOpen metric) { | 340 void ProfileMetrics::LogProfileOpenMethod(ProfileOpen metric) { |
337 DCHECK(metric < NUM_PROFILE_OPEN_METRICS); | 341 DCHECK(metric < NUM_PROFILE_OPEN_METRICS); |
338 UMA_HISTOGRAM_ENUMERATION("Profile.OpenMethod", metric, | 342 UMA_HISTOGRAM_ENUMERATION("Profile.OpenMethod", metric, |
339 NUM_PROFILE_OPEN_METRICS); | 343 NUM_PROFILE_OPEN_METRICS); |
340 } | 344 } |
341 | 345 |
342 void ProfileMetrics::LogProfileSwitch( | 346 void ProfileMetrics::LogProfileSwitch( |
343 ProfileOpen metric, | 347 ProfileOpen metric, |
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
528 UMA_HISTOGRAM_ENUMERATION("Profile.SyncSignIn", | 532 UMA_HISTOGRAM_ENUMERATION("Profile.SyncSignIn", |
529 GetProfileType(profile_path), | 533 GetProfileType(profile_path), |
530 NUM_PROFILE_TYPE_METRICS); | 534 NUM_PROFILE_TYPE_METRICS); |
531 } | 535 } |
532 | 536 |
533 void ProfileMetrics::LogProfileUpdate(const base::FilePath& profile_path) { | 537 void ProfileMetrics::LogProfileUpdate(const base::FilePath& profile_path) { |
534 UMA_HISTOGRAM_ENUMERATION("Profile.Update", | 538 UMA_HISTOGRAM_ENUMERATION("Profile.Update", |
535 GetProfileType(profile_path), | 539 GetProfileType(profile_path), |
536 NUM_PROFILE_TYPE_METRICS); | 540 NUM_PROFILE_TYPE_METRICS); |
537 } | 541 } |
OLD | NEW |