Chromium Code Reviews| Index: chrome/browser/profiles/profile_metrics.cc |
| diff --git a/chrome/browser/profiles/profile_metrics.cc b/chrome/browser/profiles/profile_metrics.cc |
| index b7023672c529c6cb7b783727d9943966ca7e4165..772b5976dc8dbaa35c373e3206a88efa489a9f7a 100644 |
| --- a/chrome/browser/profiles/profile_metrics.cc |
| +++ b/chrome/browser/profiles/profile_metrics.cc |
| @@ -113,14 +113,21 @@ bool ProfileMetrics::CountProfileInformation(ProfileManager* manager, |
| if (!number_of_profiles) |
| return false; |
| - // Maximum age for "active" profile is 4 weeks. |
| - base::Time oldest = base::Time::Now() - |
| - base::TimeDelta::FromDays(kMaximumDaysOfDisuse); |
| + |
| for (size_t i = 0; i < number_of_profiles; ++i) { |
| +// IOS and ANDROID never set an ActiveTime in the ProfileManager. |
| +#if !defined(OS_ANDROID) && !defined(OS_IOS) |
| + // Maximum age for "active" profile is 4 weeks. |
| + base::Time oldest = base::Time::Now() - |
|
bcwhite
2014/07/18 01:13:59
This is now calculating this value for every profi
|
| + base::TimeDelta::FromDays(kMaximumDaysOfDisuse); |
| + |
| if (info_cache.GetProfileActiveTimeAtIndex(i) < oldest) { |
|
bcwhite
2014/07/18 01:13:59
I think the better choice would be to set the acti
|
| counts->unused++; |
| } else { |
| +#else |
| + { |
|
bcwhite
2014/07/18 01:13:59
This duplicate open brace will break editors' auto
|
| +#endif |
| if (info_cache.ProfileIsSupervisedAtIndex(i)) |
| counts->supervised++; |
| if (!info_cache.GetUserNameOfProfileAtIndex(i).empty()) { |