Skip to content

Commit

Permalink
Merge pull request #8161 from brave/pr8150_reduce-frequencey-default-…
Browse files Browse the repository at this point in the history
…browser-dialog_1.22.x

Reduce frequency of default browser dialog (uplift to 1.22.x)
  • Loading branch information
kjozwiak authored Mar 6, 2021
2 parents 42e6ddb + 8d58527 commit bd8af09
Showing 1 changed file with 4 additions and 4 deletions.
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

0 comments on commit bd8af09

Please sign in to comment.