Decouple Startup Default Browser and Pin Inforbar prompts with randomized executionDeepak RavichandranOops, one more comment: please make the first line of the commit message 50 characters or less (60 max), per https://www.chromium.org/chromium-os/developer-library/guides/development/contributing/#commit-messages
Jesse McKennaDone
Deepak RavichandranLooks like this was missed : ) how about "Decouple default browser and taskbar pinning" per davidbienvenu@'s earlier suggestion?
Done
base::OnceCallback<void(bool)> default_browser_prompt_shown_callback =
base::DoNothing();
#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN)
if (base::FeatureList::IsEnabled(features::kPdfInfoBar)) {
default_browser_prompt_shown_callback = base::BindOnce(
&pdf::infobar::PdfInfoBarController::MaybeShowInfoBarAtStartup,
browser->GetWeakPtr());
}
#endif // BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN)Deepak RavichandranThis probably should be declared inside the `is_first_run == chrome::startup::IsFirstRun::kNo` block. But also might be better to integrate the pdf checks inside the else case since it would be easier to read and follow the code.
great idea - done.
ShowDefaultBrowserPrompt(
profile, std::move(default_browser_prompt_shown_callback));Deepak RavichandranSo this is default browser with either pinning if enabled or fallback to pdf if enabled.
Added a comment.
ShowDefaultBrowserPrompt(profile,
std::move(default_browser_prompt_shown_callback));Deepak RavichandranSo this is purely default browser path since it's non mac/windows
Added a comment.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Decouple default browser and taskbar pinning
The goal is to eliminate cross-prompt dependencies and evaluate user
engagement when these prompts are treated as mutually exclusive,
parallel strands.
Key Changes:
- Randomized Execution Arms: Refactored AddInfoBarsIfNecessary in
infobar_utils.cc to randomly select (50/50 coin flip) between two
startup execution/experimental paths:
* Arm 0: Show "Default Browser prompt" to "PDF Default" check.
* Arm 1: Show "Pin to Taskbar/Dock prompt" to "PDF Default
check."
* This ensures only one major onboarding prompt is shown per
session while maintaining the PDF check as the final step in all cases.
- Complete Decoupling:
* Windows: Suppressed the legacy "combined" prompt logic in
DefaultBrowserPromptManager that typically merges Default and Pinning
into a single infobar.
* Mac/Win: Relaxed the PinInfoBarController to allow the pinning
prompt even if Chrome is not the default browser.
- Adjustable Experiment Parameters: Added base::FeatureParam support
to kSeparateDefaultAndPinPrompt to allow remote configuration of the
frequency caps for the experiment arm:
* random_seed: Allows forcing a specific experiment arm(0 or 1)
for deterministic testing.
* pin_max_count / pin_cooldown_days: Custom limits for the
Pinning prompt.
* default_max_count / default_cooldown_days: Custom limits for
the Default Browser prompt.
//======================CHEAT SHEET FOR TESTING=============
Ensure Chromium is not pinned to task bar or set to default.
* Run chrome after compiling - go through FRE;
* Do not set Chrome to default or pin to taskbar
out\Default\chrome.exe --user-data-dir=C:\tmp\test_profile
Run again to do actual testing;
*Test "Chrome defaulting flow"
out\Default\chrome.exe --user-data-dir=C:\tmp\test_profile --disable-features=SessionRestoreInfobar --enable-features=SeparateDefaultAndPinPrompt:random_seed/2/default_cooldown_days/0/default_max_count/100
*Test "Pin to taskbar flow"
out\Default\chrome.exe --user-data-dir=C:\tmp\test_profile --disable-features=SessionRestoreInfobar --enable-features=SeparateDefaultAndPinPrompt:random_seed/3/pin_cooldown_days/0/pin_max_count/100/default_cooldown_days/0/default_max_count/100,OfferPinToTaskbarInfoBar
* Delete the profile Directory
Remove-Item -Recurse -Force "C:\tmp\test_profile"
//=========END================================================
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |