forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Launcher pop-in] Add skeleton class of BurnInRanker.
This CL adds a skeleton class for a new BurnInRanker. Follow ups will add method implementations. Once implemented, this will be a lightweight ranker at the end of the ranking stack. It will be responsible for two main tasks: (1) Enforcing a "burn-in" period of some fixed number of milliseconds, during which results are collected from providers but are not published to the front-end. The purpose of this is to prevent the rapid and jittery updating of the result list at the beginning of display. (2) Tracking results as belonging to either the pre-burn-in period or the post-burn-in period. Post-burn-in results will have special handling (e.g. append-only within a category), with exact details TBD. Test: builds Bug: 1279686 Change-Id: I7c170ee3791256a1f3d7f0a20493e5ecf775cddf Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3336923 Reviewed-by: Rachel Wong <wrong@chromium.org> Commit-Queue: Amanda Deacon <amandadeacon@chromium.org> Cr-Commit-Position: refs/heads/main@{#951417}
- Loading branch information
Amanda Deacon
authored and
Chromium LUCI CQ
committed
Dec 14, 2021
1 parent
5b2b0c2
commit e5754bb
Showing
4 changed files
with
59 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
chrome/browser/ui/app_list/search/ranking/burn_in_ranker.cc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
// Copyright 2021 The Chromium Authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style license that can be | ||
// found in the LICENSE file. | ||
|
||
#include "chrome/browser/ui/app_list/search/ranking/burn_in_ranker.h" | ||
|
||
namespace app_list { | ||
|
||
void BurnInRanker::UpdateResultRanks(ResultsMap& results, | ||
ProviderType provider) { | ||
// TODO(crbug.com/1279686): Implement. | ||
} | ||
|
||
} // namespace app_list |
39 changes: 39 additions & 0 deletions
39
chrome/browser/ui/app_list/search/ranking/burn_in_ranker.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
// Copyright 2021 The Chromium Authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style license that can be | ||
// found in the LICENSE file. | ||
|
||
#ifndef CHROME_BROWSER_UI_APP_LIST_SEARCH_RANKING_BURN_IN_RANKER_H_ | ||
#define CHROME_BROWSER_UI_APP_LIST_SEARCH_RANKING_BURN_IN_RANKER_H_ | ||
|
||
#include "chrome/browser/ui/app_list/search/ranking/ranker.h" | ||
|
||
namespace app_list { | ||
|
||
// A ranker which implements a "burn-in" period for the updating of results. | ||
// | ||
// This ranker has two main tasks: | ||
// | ||
// 1) Delay the release of results until after the burn-in period has ended. | ||
// The purpose of this is to prevent the rapid and jittery updating of the | ||
// results list on initial display. | ||
// | ||
// 2) Mark each result as having arrived pre- or post-burn-in time. | ||
// Post-burn-in results may undergo special handling (e.g. append-only), | ||
// with exact details TBD. | ||
// | ||
// TODO(crbug.com/1279686): Update description when implemented. | ||
class BurnInRanker : public Ranker { | ||
public: | ||
BurnInRanker() = default; | ||
~BurnInRanker() override = default; | ||
|
||
BurnInRanker(const BurnInRanker&) = delete; | ||
BurnInRanker& operator=(const BurnInRanker&) = delete; | ||
|
||
// Ranker: | ||
void UpdateResultRanks(ResultsMap& results, ProviderType provider) override; | ||
}; | ||
|
||
} // namespace app_list | ||
|
||
#endif // CHROME_BROWSER_UI_APP_LIST_SEARCH_RANKING_BURN_IN_RANKER_H_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters