Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2663)

Unified Diff: chrome/browser/ui/startup/default_browser_prompt.cc

Issue 1657933003: Fixes the interactive default browser UX for policy setting (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: grt comments Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/startup/default_browser_prompt.cc
diff --git a/chrome/browser/ui/startup/default_browser_prompt.cc b/chrome/browser/ui/startup/default_browser_prompt.cc
index b5710ea423076d36e0dc4251987a8857b1303102..3c1d4680e086ad08541142a7edc23af86afe5d98 100644
--- a/chrome/browser/ui/startup/default_browser_prompt.cc
+++ b/chrome/browser/ui/startup/default_browser_prompt.cc
@@ -177,7 +177,7 @@ bool DefaultBrowserInfoBarDelegate::Accept() {
InfoBarUserInteraction::START_SET_AS_DEFAULT,
NUM_INFO_BAR_USER_INTERACTION_TYPES);
scoped_refptr<ShellIntegration::DefaultBrowserWorker>(
- new ShellIntegration::DefaultBrowserWorker(nullptr))
+ new ShellIntegration::DefaultBrowserWorker(nullptr, false))
->StartSetAsDefault();
return true;
}
@@ -209,7 +209,6 @@ class CheckDefaultBrowserObserver
private:
void SetDefaultWebClientUIState(
ShellIntegration::DefaultWebClientUIState state) override;
- bool IsOwnedByWorker() override;
void ResetCheckDefaultBrowserPref();
void ShowPrompt();
@@ -247,11 +246,6 @@ void CheckDefaultBrowserObserver::SetDefaultWebClientUIState(
}
}
-bool CheckDefaultBrowserObserver::IsOwnedByWorker() {
- // Instruct the DefaultBrowserWorker to delete this instance when it is done.
- return true;
-}
-
void CheckDefaultBrowserObserver::ResetCheckDefaultBrowserPref() {
Profile* profile =
g_browser_process->profile_manager()->GetProfileByPath(profile_path_);
@@ -323,7 +317,8 @@ void ShowDefaultBrowserPrompt(Profile* profile, HostDesktopType desktop_type) {
scoped_refptr<ShellIntegration::DefaultBrowserWorker>(
new ShellIntegration::DefaultBrowserWorker(
new CheckDefaultBrowserObserver(profile->GetPath(), show_prompt,
- desktop_type)))
+ desktop_type),
+ true))
->StartCheckIsDefault();
}

Powered by Google App Engine
This is Rietveld 408576698