Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[suggest-internals] Moves deletion requests to RemoteSuggestionsService
SuggestionDeletionHandler is a class, internal to BaseSearchProvider, which is responsible for making deletion requests to the backend for personalized suggestions. BaseSearchProvider creates a new instance of this class for every deletion request and holds on to it until the request has completed. This encapsulation seems unnecessary and wasteful as the deletion handler does not do much other than creating a loader, starting download, and holding on to the loader. BaseSearchProvider could simply hold on to the network::SimpleURLLoader reference itself. This change moves the SuggestionDeletionHandler logic into the RemoteSuggestionsService in order to centralize all Suggest requests in one place. One noteworthy change is that we now always pass InIncognito::kNo to variations::AppendVariationsHeaderUnknownSignedIn(). This however OK since deletion requests are expected in non-incognito state only as remote suggestions are not served in incognito mode. Bug: 1410570 Change-Id: Icc2a2ff750d6cfb82d0e7ef8250fab53c6c466cf Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4201067 Reviewed-by: Tommy Li <tommycli@chromium.org> Commit-Queue: Moe Ahmadi <mahmadi@chromium.org> Cr-Commit-Position: refs/heads/main@{#1098187}
- Loading branch information
Moe Ahmadi
authored and
Chromium LUCI CQ
committed
Jan 27, 2023
1 parent
830bf03
commit e53dc84
Showing
6 changed files
with
109 additions
and
125 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
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
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
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
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
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