Chromium Code Reviews| 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; |
| } |