Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(64)

Unified Diff: chrome/browser/profiles/profile_manager.cc

Issue 134863002: Track when profiles are last used. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: don't send notifications for active-time updates; nobody wants it and some tests aren't prepared fo… Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/profiles/profile_info_interface.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/profiles/profile_manager.cc
diff --git a/chrome/browser/profiles/profile_manager.cc b/chrome/browser/profiles/profile_manager.cc
index 711740c2d4c745eedcbaff599a5fdc223413460d..e1811db1192a6e6963cc2457c68576626205ba9e 100644
--- a/chrome/browser/profiles/profile_manager.cc
+++ b/chrome/browser/profiles/profile_manager.cc
@@ -1196,6 +1196,12 @@ void ProfileManager::BrowserListObserver::OnBrowserSetLastActive(
last_active->GetPath()) != profile_manager_->profiles_info_.end()) {
local_state->SetString(prefs::kProfileLastUsed,
last_active->GetPath().BaseName().MaybeAsASCII());
+
+ ProfileInfoCache& cache = profile_manager_->GetProfileInfoCache();
+ size_t profile_index =
+ cache.GetIndexOfProfileWithPath(last_active->GetPath());
+ if (profile_index != std::string::npos)
+ cache.SetProfileActiveTimeAtIndex(profile_index);
}
}
#endif // !defined(OS_ANDROID) && !defined(OS_IOS)
« no previous file with comments | « chrome/browser/profiles/profile_info_interface.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698