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

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: Rebase Created 4 years, 10 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 09d3ceffdd01c16a10f598e4d9e3bf2e5725b6ba..c1540006555481a081a94655a3f95944df44259b 100644
--- a/chrome/browser/ui/startup/default_browser_prompt.cc
+++ b/chrome/browser/ui/startup/default_browser_prompt.cc
@@ -177,7 +177,8 @@ bool DefaultBrowserInfoBarDelegate::Accept() {
InfoBarUserInteraction::START_SET_AS_DEFAULT,
NUM_INFO_BAR_USER_INTERACTION_TYPES);
scoped_refptr<shell_integration::DefaultBrowserWorker>(
- new shell_integration::DefaultBrowserWorker(nullptr))
+ new shell_integration::DefaultBrowserWorker(nullptr,
+ /*delete_observer=*/false))
Nico 2016/02/10 17:33:58 ditto
Patrick Monette 2016/02/10 20:44:42 Done.
->StartSetAsDefault();
return true;
}
@@ -209,7 +210,6 @@ class CheckDefaultBrowserObserver
private:
void SetDefaultWebClientUIState(
shell_integration::DefaultWebClientUIState state) override;
- bool IsOwnedByWorker() override;
void ResetCheckDefaultBrowserPref();
void ShowPrompt();
@@ -247,11 +247,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 +318,8 @@ void ShowDefaultBrowserPrompt(Profile* profile, HostDesktopType desktop_type) {
scoped_refptr<shell_integration::DefaultBrowserWorker>(
new shell_integration::DefaultBrowserWorker(
new CheckDefaultBrowserObserver(profile->GetPath(), show_prompt,
- desktop_type)))
+ desktop_type),
+ /*delete_observer=*/true))
->StartCheckIsDefault();
}

Powered by Google App Engine
This is Rietveld 408576698