Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reduce frequency of default browser dialog (uplift to 1.21.x) #8162

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions browser/ui/startup/default_brave_browser_prompt.cc
Original file line number Diff line number Diff line change
Expand Up @@ -122,10 +122,9 @@ bool ShouldShowDefaultBrowserPrompt(Profile* profile) {
const int current_count =
profile->GetPrefs()->GetInteger(kDefaultBrowserLaunchingCount);

// We only show prompt at 2nd, 3rd, 4th, 8th and 20th.
// We only show prompt at 3rd and 20th.
// This is not called at first run. So, count 1 is second run.
if (current_count == 1 || current_count == 2 || current_count == 3 ||
current_count == 7 || current_count == 19)
if (current_count == 2 || current_count == 19)
return true;

return false;
Expand Down Expand Up @@ -166,7 +165,8 @@ void ShowDefaultBraveBrowserPrompt(Profile* profile) {
}

void ResetDefaultBraveBrowserPrompt(Profile* profile) {
profile->GetPrefs()->ClearPref(kDefaultBrowserLaunchingCount);
// Don't reset, but keep this function for now as more work is
// planned in https://github.com/brave/brave-browser/issues/14469
}

void RegisterDefaultBraveBrowserPromptPrefs(PrefRegistrySimple* registry) {
Expand Down