Skip to content

Commit

Permalink
Merge pull request #8150 from brave/reduce-frequencey-default-browser…
Browse files Browse the repository at this point in the history
…-dialog

Reduce frequency of default browser dialog
  • Loading branch information
emerick authored Mar 6, 2021
2 parents 6525256 + 95f3ac3 commit a459020
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 a459020

Please sign in to comment.