| Index: chrome/browser/profiles/profile_metrics.cc
|
| diff --git a/chrome/browser/profiles/profile_metrics.cc b/chrome/browser/profiles/profile_metrics.cc
|
| index f9b3046b319b1eadcdec980ac1639c60c0044aef..6dfcf73c00b427620233ea57f637a11da634bcb7 100644
|
| --- a/chrome/browser/profiles/profile_metrics.cc
|
| +++ b/chrome/browser/profiles/profile_metrics.cc
|
| @@ -20,10 +20,7 @@
|
|
|
| namespace {
|
|
|
| -#if defined(OS_WIN) || defined(OS_MACOSX)
|
| const int kMaximumReportedProfileCount = 5;
|
| -#endif
|
| -
|
| const int kMaximumDaysOfDisuse = 4 * 7; // Should be integral number of weeks.
|
|
|
| size_t number_of_profile_switches_ = 0;
|
| @@ -68,6 +65,12 @@
|
| metric = ProfileMetrics::ORIGINAL;
|
| }
|
| return metric;
|
| +}
|
| +
|
| +void UpdateReportedOSProfileStatistics(int active, int signedin) {
|
| +#if defined(OS_WIN)
|
| + GoogleUpdateSettings::UpdateProfileCounts(active, signedin);
|
| +#endif
|
| }
|
|
|
| void LogLockedProfileInformation(ProfileManager* manager) {
|
| @@ -174,11 +177,10 @@
|
| }
|
|
|
| void ProfileMetrics::UpdateReportedProfilesStatistics(ProfileManager* manager) {
|
| -#if defined(OS_WIN) || defined(OS_MACOSX)
|
| ProfileCounts counts;
|
| if (CountProfileInformation(manager, &counts)) {
|
| - size_t limited_total = counts.total;
|
| - size_t limited_signedin = counts.signedin;
|
| + int limited_total = counts.total;
|
| + int limited_signedin = counts.signedin;
|
| if (limited_total > kMaximumReportedProfileCount) {
|
| limited_total = kMaximumReportedProfileCount + 1;
|
| limited_signedin =
|
| @@ -187,21 +189,12 @@
|
| }
|
| UpdateReportedOSProfileStatistics(limited_total, limited_signedin);
|
| }
|
| -#endif
|
| }
|
|
|
| void ProfileMetrics::LogNumberOfProfileSwitches() {
|
| UMA_HISTOGRAM_COUNTS_100("Profile.NumberOfSwitches",
|
| number_of_profile_switches_);
|
| }
|
| -
|
| -// The OS_MACOSX implementation of this function is in profile_metrics_mac.mm.
|
| -#if defined(OS_WIN)
|
| -void ProfileMetrics::UpdateReportedOSProfileStatistics(
|
| - size_t active, size_t signedin) {
|
| - GoogleUpdateSettings::UpdateProfileCounts(active, signedin);
|
| -}
|
| -#endif
|
|
|
| void ProfileMetrics::LogNumberOfProfiles(ProfileManager* manager) {
|
| ProfileCounts counts;
|
| @@ -224,10 +217,7 @@
|
| counts.auth_errors);
|
|
|
| LogLockedProfileInformation(manager);
|
| -
|
| -#if defined(OS_WIN) || defined(OS_MACOSX)
|
| UpdateReportedOSProfileStatistics(counts.total, counts.signedin);
|
| -#endif
|
| }
|
| }
|
|
|
|
|