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

Unified Diff: chrome/browser/ui/app_list/search/app_result.cc

Issue 2225073002: [Chrome OS] Change layout of the launcher. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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/search/app_result.cc
diff --git a/chrome/browser/ui/app_list/search/app_result.cc b/chrome/browser/ui/app_list/search/app_result.cc
index 79d03e07d6f5807e05fb4deb658c9787e3dc4ae6..d20544c13cb571e33332f6b47b20d2cd7c586133 100644
--- a/chrome/browser/ui/app_list/search/app_result.cc
+++ b/chrome/browser/ui/app_list/search/app_result.cc
@@ -23,12 +23,13 @@ AppResult::AppResult(Profile* profile,
AppResult::~AppResult() {
}
-void AppResult::UpdateFromLastLaunched(const base::Time& current_time,
- const base::Time& last_launched) {
- base::TimeDelta delta = current_time - last_launched;
+void AppResult::UpdateFromLastLaunchedOrInstalledTime(
+ const base::Time& current_time,
+ const base::Time& old_time) {
+ base::TimeDelta delta = current_time - old_time;
xiyuan 2016/08/08 18:02:15 nit: move this after the "if" below since you are
xdai1 2016/08/08 21:25:37 Done.
// |current_time| can be before |last_launched| in weird cases such as users
xiyuan 2016/08/08 18:02:15 nit: update this comment, |last_launched| -> |old_
xdai1 2016/08/08 21:25:37 Done.
// playing with their clocks. Handle this gracefully.
- if (current_time < last_launched) {
+ if (current_time < old_time) {
set_relevance(1.0);
return;
}

Powered by Google App Engine
This is Rietveld 408576698