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

Unified Diff: chrome/browser/ui/app_list/app_list_service_impl.cc

Issue 1016503006: Don't warmup the app list if it hasn't been used in the past 28 days. [Win] (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@fix_da_check_save
Patch Set: fix_unittests Created 5 years, 8 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
Index: chrome/browser/ui/app_list/app_list_service_impl.cc
diff --git a/chrome/browser/ui/app_list/app_list_service_impl.cc b/chrome/browser/ui/app_list/app_list_service_impl.cc
index 3808fee61706a952be5251d787ac969d2737f888..57397697e8fd66d3db61fcb57c1763253a74ae02 100644
--- a/chrome/browser/ui/app_list/app_list_service_impl.cc
+++ b/chrome/browser/ui/app_list/app_list_service_impl.cc
@@ -213,6 +213,7 @@ void AppListServiceImpl::RecordAppListLaunch() {
prefs::kAppListLaunchCount,
&SendAppListLaunch);
RecordAppListDiscoverability(local_state_, false);
+ RecordAppListLastLaunch();
}
// static
@@ -223,6 +224,19 @@ void AppListServiceImpl::RecordAppListAppLaunch() {
}
// static
+void AppListServiceImpl::RecordAppListLastLaunch() {
+ if (!g_browser_process)
+ return; // In a unit test.
+
+ PrefService* local_state = g_browser_process->local_state();
+ if (!local_state)
+ return; // In a unit test.
+
+ local_state->SetInt64(prefs::kAppListLastLaunchTime,
+ base::Time::Now().ToInternalValue());
+}
+
+// static
void AppListServiceImpl::SendAppListStats() {
if (!g_browser_process || g_browser_process->IsShuttingDown())
return;
« no previous file with comments | « chrome/browser/ui/app_list/app_list_service_impl.h ('k') | chrome/browser/ui/views/app_list/win/app_list_service_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698