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

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

Issue 2253253002: [Merge to M53][Chrome OS] Change layout of the launcher. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2785
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..f6ec7289f23c8317b47c1219eee511dc5a530342 100644
--- a/chrome/browser/ui/app_list/search/app_result.cc
+++ b/chrome/browser/ui/app_list/search/app_result.cc
@@ -23,16 +23,17 @@ 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;
- // |current_time| can be before |last_launched| in weird cases such as users
+void AppResult::UpdateFromLastLaunchedOrInstalledTime(
+ const base::Time& current_time,
+ const base::Time& old_time) {
+ // |current_time| can be before |old_time| in weird cases such as users
// playing with their clocks. Handle this gracefully.
- if (current_time < last_launched) {
+ if (current_time < old_time) {
set_relevance(1.0);
return;
}
+ base::TimeDelta delta = current_time - old_time;
const int kSecondsInWeek = 60 * 60 * 24 * 7;
// Set the relevance to a value between 0 and 1. This function decays as the
« no previous file with comments | « chrome/browser/ui/app_list/search/app_result.h ('k') | chrome/browser/ui/app_list/search/app_search_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698