Index: chrome/browser/external_protocol/external_protocol_handler.cc |
diff --git a/chrome/browser/external_protocol/external_protocol_handler.cc b/chrome/browser/external_protocol/external_protocol_handler.cc |
index 90b54281b32cdaca44d9dacc26c84a815fd45d65..84b0e42466f83ddccd6305d51f69b64060b3561e 100644 |
--- a/chrome/browser/external_protocol/external_protocol_handler.cc |
+++ b/chrome/browser/external_protocol/external_protocol_handler.cc |
@@ -38,14 +38,15 @@ static bool g_accept_requests = true; |
namespace { |
// Functions enabling unit testing. Using a NULL delegate will use the default |
-// behavior; if a delegate is provided it will be used instead. |
+// behavior; if a delegate is provided it will be used instead. Also, Ownership |
+// of |observer| is passed to the new worker. |
ShellIntegration::DefaultProtocolClientWorker* CreateShellWorker( |
ShellIntegration::DefaultWebClientObserver* observer, |
const std::string& protocol, |
ExternalProtocolHandler::Delegate* delegate) { |
if (!delegate) |
- return new ShellIntegration::DefaultProtocolClientWorker(observer, |
- protocol); |
+ return new ShellIntegration::DefaultProtocolClientWorker(observer, protocol, |
+ true); |
return delegate->CreateShellWorker(observer, protocol); |
} |
@@ -146,8 +147,6 @@ class ExternalDefaultProtocolObserver |
escaped_url_, render_process_host_id_, tab_contents_id_, delegate_); |
} |
- bool IsOwnedByWorker() override { return true; } |
- |
private: |
ExternalProtocolHandler::Delegate* delegate_; |
const GURL escaped_url_; |