-
Notifications
You must be signed in to change notification settings - Fork 6.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[send-tab-to-self] Make GetEntryPointDisplayReason() a method
No behavior change. Before this CL there was a GetEntryPointDisplayReason(...) free function taking a bunch of services as parameters, including the send-tab-to-self keyed service (SendTabToSelfSyncService). Add SendTabToSelfSyncService::GetEntryPointDisplayReason(const GURL&) and migrate callers. Advantages: - Easier testing, we can fake one service (SendTabToSelfSyncService) instead of many. - Hides dependencies. I might add a new service dependency soon, I don't want to update every caller each time I do so. The free function still exists, moved to an "internal" namespace, and is called by SendTabToSelfSyncService. I would prefer to inline the logic in SendTabToSelfSyncService and unit test that class, but this requires moving the construction of some fields to the parent and it looked weird for one particular WeakPtr. So I decided against. For next CLs we could consider removing "Sync" from the name of the service. Its API isn't tied to sync before this CL and now even less so. Bug: 1468530 Change-Id: I78a50af61d134c28e7b0b146c20e08eb7937e5f7 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4774411 Auto-Submit: Victor Vianna <victorvianna@google.com> Commit-Queue: Victor Vianna <victorvianna@google.com> Reviewed-by: Sergio Collazos <sczs@chromium.org> Cr-Commit-Position: refs/heads/main@{#1184400}
- Loading branch information
Victor Hugo Vianna Silva
authored and
Chromium LUCI CQ
committed
Aug 16, 2023
1 parent
3eebd4d
commit fd4cc6d
Showing
14 changed files
with
164 additions
and
168 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
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
Oops, something went wrong.