| 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" |
| 11 #include "chrome/browser/profiles/profile.h" | 11 #include "chrome/browser/profiles/profile.h" |
| 12 #include "chrome/browser/profiles/profile_info_cache.h" | 12 #include "chrome/browser/profiles/profile_info_cache.h" |
| 13 #include "chrome/browser/profiles/profile_manager.h" | 13 #include "chrome/browser/profiles/profile_manager.h" |
| 14 #include "chrome/browser/signin/signin_header_helper.h" | 14 #include "chrome/browser/signin/signin_header_helper.h" |
| 15 #include "chrome/browser/ui/sync/one_click_signin_histogram.h" |
| 15 #include "chrome/common/chrome_constants.h" | 16 #include "chrome/common/chrome_constants.h" |
| 16 #include "chrome/installer/util/google_update_settings.h" | 17 #include "chrome/installer/util/google_update_settings.h" |
| 17 #include "content/public/browser/browser_thread.h" | 18 #include "content/public/browser/browser_thread.h" |
| 18 #include "content/public/browser/user_metrics.h" | 19 #include "content/public/browser/user_metrics.h" |
| 19 | 20 |
| 20 namespace { | 21 namespace { |
| 21 | 22 |
| 22 const int kMaximumReportedProfileCount = 5; | 23 const int kMaximumReportedProfileCount = 5; |
| 23 const int kMaximumDaysOfDisuse = 4 * 7; // Should be integral number of weeks. | 24 const int kMaximumDaysOfDisuse = 4 * 7; // Should be integral number of weeks. |
| 24 | 25 |
| (...skipping 435 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 460 UMA_HISTOGRAM_ENUMERATION("Profile.SyncSignIn", | 461 UMA_HISTOGRAM_ENUMERATION("Profile.SyncSignIn", |
| 461 GetProfileType(profile_path), | 462 GetProfileType(profile_path), |
| 462 NUM_PROFILE_TYPE_METRICS); | 463 NUM_PROFILE_TYPE_METRICS); |
| 463 } | 464 } |
| 464 | 465 |
| 465 void ProfileMetrics::LogProfileUpdate(const base::FilePath& profile_path) { | 466 void ProfileMetrics::LogProfileUpdate(const base::FilePath& profile_path) { |
| 466 UMA_HISTOGRAM_ENUMERATION("Profile.Update", | 467 UMA_HISTOGRAM_ENUMERATION("Profile.Update", |
| 467 GetProfileType(profile_path), | 468 GetProfileType(profile_path), |
| 468 NUM_PROFILE_TYPE_METRICS); | 469 NUM_PROFILE_TYPE_METRICS); |
| 469 } | 470 } |
| 471 |
| 472 void ProfileMetrics::LogSigninSource(signin::Source source) { |
| 473 UMA_HISTOGRAM_ENUMERATION("Signin.SigninSource", |
| 474 source, |
| 475 one_click_signin::HISTOGRAM_MAX); |
| 476 } |
| OLD | NEW |