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

Unified Diff: chrome/browser/browser_process_impl.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
« no previous file with comments | « no previous file | chrome/browser/custom_handlers/protocol_handler_registry.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/browser_process_impl.cc
diff --git a/chrome/browser/browser_process_impl.cc b/chrome/browser/browser_process_impl.cc
index d8b9bc6ec6df5e9c92024f949453409e9a932d66..5007a5a72d1906e88d2c09aca038afbb89ba325c 100644
--- a/chrome/browser/browser_process_impl.cc
+++ b/chrome/browser/browser_process_impl.cc
@@ -1196,8 +1196,17 @@ void BrowserProcessImpl::CreateGCMDriver() {
void BrowserProcessImpl::ApplyDefaultBrowserPolicy() {
if (local_state()->GetBoolean(prefs::kDefaultBrowserSettingEnabled)) {
+ // 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.
scoped_refptr<shell_integration::DefaultWebClientWorker>
- set_browser_worker = new shell_integration::DefaultBrowserWorker(NULL);
+ set_browser_worker = new shell_integration::DefaultBrowserWorker(
+ nullptr,
+ /*delete_observer=*/false);
+ // The user interaction must always be disabled when applying the default
+ // browser policy since it is done at each browser startup and the result
+ // of the interaction cannot be forced.
+ set_browser_worker->set_interactive_permitted(false);
set_browser_worker->StartSetAsDefault();
}
}
« no previous file with comments | « no previous file | chrome/browser/custom_handlers/protocol_handler_registry.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698