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

Unified Diff: chrome/browser/custom_handlers/protocol_handler_registry.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/custom_handlers/protocol_handler_registry.cc
diff --git a/chrome/browser/custom_handlers/protocol_handler_registry.cc b/chrome/browser/custom_handlers/protocol_handler_registry.cc
index a98610fac9e43a6bd93bef81643d0bad9c387002..c0e69ac0f57e5fed22383d5e5f2c86102e4c197b 100644
--- a/chrome/browser/custom_handlers/protocol_handler_registry.cc
+++ b/chrome/browser/custom_handlers/protocol_handler_registry.cc
@@ -261,20 +261,11 @@ void ProtocolHandlerRegistry::DefaultClientObserver::SetDefaultWebClientUIState(
}
}
-bool ProtocolHandlerRegistry::DefaultClientObserver::
- IsInteractiveSetDefaultPermitted() {
- return true;
-}
-
void ProtocolHandlerRegistry::DefaultClientObserver::SetWorker(
shell_integration::DefaultProtocolClientWorker* worker) {
worker_ = worker;
}
-bool ProtocolHandlerRegistry::DefaultClientObserver::IsOwnedByWorker() {
- return true;
-}
-
// Delegate --------------------------------------------------------------------
ProtocolHandlerRegistry::Delegate::~Delegate() {}
@@ -303,7 +294,8 @@ shell_integration::DefaultProtocolClientWorker*
ProtocolHandlerRegistry::Delegate::CreateShellWorker(
shell_integration::DefaultWebClientObserver* observer,
const std::string& protocol) {
- return new shell_integration::DefaultProtocolClientWorker(observer, protocol);
+ return new shell_integration::DefaultProtocolClientWorker(
+ observer, protocol, /*delete_observer=*/true);
}
ProtocolHandlerRegistry::DefaultClientObserver*
@@ -315,7 +307,7 @@ ProtocolHandlerRegistry::Delegate::CreateShellObserver(
void ProtocolHandlerRegistry::Delegate::RegisterWithOSAsDefaultClient(
const std::string& protocol, ProtocolHandlerRegistry* registry) {
DefaultClientObserver* observer = CreateShellObserver(registry);
- // The worker pointer is reference counted. While it is running the
+ // 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::DefaultProtocolClientWorker> worker;

Powered by Google App Engine
This is Rietveld 408576698