| Index: chrome/browser/profiles/profile_metrics.cc
|
| diff --git a/chrome/browser/profiles/profile_metrics.cc b/chrome/browser/profiles/profile_metrics.cc
|
| index 0c4560e8b0f52e6ba4c3336c5110e39b8ba14720..2a40ed55aa1fff46a0a7e0412782ef091d206113 100644
|
| --- a/chrome/browser/profiles/profile_metrics.cc
|
| +++ b/chrome/browser/profiles/profile_metrics.cc
|
| @@ -20,7 +20,10 @@
|
|
|
| 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;
|
| @@ -67,12 +70,6 @@ ProfileMetrics::ProfileType GetProfileType(
|
| return metric;
|
| }
|
|
|
| -void UpdateReportedOSProfileStatistics(int active, int signedin) {
|
| -#if defined(OS_WIN)
|
| - GoogleUpdateSettings::UpdateProfileCounts(active, signedin);
|
| -#endif
|
| -}
|
| -
|
| void LogLockedProfileInformation(ProfileManager* manager) {
|
| const ProfileInfoCache& info_cache = manager->GetProfileInfoCache();
|
| size_t number_of_profiles = info_cache.GetNumberOfProfiles();
|
| @@ -177,10 +174,11 @@ bool ProfileMetrics::CountProfileInformation(ProfileManager* manager,
|
| }
|
|
|
| void ProfileMetrics::UpdateReportedProfilesStatistics(ProfileManager* manager) {
|
| +#if defined(OS_WIN) || defined(OS_MACOSX)
|
| ProfileCounts counts;
|
| if (CountProfileInformation(manager, &counts)) {
|
| - int limited_total = counts.total;
|
| - int limited_signedin = counts.signedin;
|
| + size_t limited_total = counts.total;
|
| + size_t limited_signedin = counts.signedin;
|
| if (limited_total > kMaximumReportedProfileCount) {
|
| limited_total = kMaximumReportedProfileCount + 1;
|
| limited_signedin =
|
| @@ -189,6 +187,7 @@ void ProfileMetrics::UpdateReportedProfilesStatistics(ProfileManager* manager) {
|
| }
|
| UpdateReportedOSProfileStatistics(limited_total, limited_signedin);
|
| }
|
| +#endif
|
| }
|
|
|
| void ProfileMetrics::LogNumberOfProfileSwitches() {
|
| @@ -196,6 +195,14 @@ void ProfileMetrics::LogNumberOfProfileSwitches() {
|
| 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;
|
| bool success = CountProfileInformation(manager, &counts);
|
| @@ -217,7 +224,10 @@ void ProfileMetrics::LogNumberOfProfiles(ProfileManager* manager) {
|
| counts.auth_errors);
|
|
|
| LogLockedProfileInformation(manager);
|
| +
|
| +#if defined(OS_WIN) || defined(OS_MACOSX)
|
| UpdateReportedOSProfileStatistics(counts.total, counts.signedin);
|
| +#endif
|
| }
|
| }
|
|
|
|
|