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

Unified Diff: chrome/browser/ui/webui/options/browser_options_handler.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: Fix merge issue 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/webui/options/browser_options_handler.cc
diff --git a/chrome/browser/ui/webui/options/browser_options_handler.cc b/chrome/browser/ui/webui/options/browser_options_handler.cc
index ea2eb7612b3f8fbbc3de910fe4e757c7c823c31a..1c4de7ab1dbe37f1017db53573033d65b787303d 100644
--- a/chrome/browser/ui/webui/options/browser_options_handler.cc
+++ b/chrome/browser/ui/webui/options/browser_options_handler.cc
@@ -186,7 +186,11 @@ BrowserOptionsHandler::BrowserOptionsHandler()
#endif // defined(OS_CHROMEOS)
signin_observer_(this),
weak_ptr_factory_(this) {
- default_browser_worker_ = new shell_integration::DefaultBrowserWorker(this);
+ // The worker pointer is reference counted. While it is running, the
+ // message loops of the FILE and UI thread will hold references to it
+ // and it will be automatically freed once all its tasks have finished.
+ default_browser_worker_ = new shell_integration::DefaultBrowserWorker(
+ this, /*delete_observer=*/false);
#if defined(ENABLE_SERVICE_DISCOVERY)
cloud_print_mdns_ui_enabled_ = true;
@@ -1144,10 +1148,6 @@ void BrowserOptionsHandler::SetDefaultWebClientUIState(
SetDefaultBrowserUIString(status_string_id);
}
-bool BrowserOptionsHandler::IsInteractiveSetDefaultPermitted() {
- return true; // This is UI so we can allow it.
-}
-
void BrowserOptionsHandler::SetDefaultBrowserUIString(int status_string_id) {
base::StringValue status_string(
l10n_util::GetStringFUTF16(status_string_id,
« no previous file with comments | « chrome/browser/ui/webui/options/browser_options_handler.h ('k') | chrome/browser/ui/webui/set_as_default_browser_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698