| Index: chrome/browser/ui/external_protocol_dialog_delegate.cc
|
| diff --git a/chrome/browser/ui/external_protocol_dialog_delegate.cc b/chrome/browser/ui/external_protocol_dialog_delegate.cc
|
| index 925c834bc0a019d6f0d48bfa7aaa9b9f91577e01..20c662fd7872ba0a391b06e51ce28d1c877b9fdb 100644
|
| --- a/chrome/browser/ui/external_protocol_dialog_delegate.cc
|
| +++ b/chrome/browser/ui/external_protocol_dialog_delegate.cc
|
| @@ -5,7 +5,6 @@
|
| #include "chrome/browser/ui/external_protocol_dialog_delegate.h"
|
|
|
| #include "chrome/browser/external_protocol/external_protocol_handler.h"
|
| -#include "chrome/browser/profiles/profile.h"
|
| #include "chrome/browser/tab_contents/tab_util.h"
|
| #include "chrome/grit/chromium_strings.h"
|
| #include "chrome/grit/generated_resources.h"
|
| @@ -62,16 +61,13 @@
|
|
|
| void ExternalProtocolDialogDelegate::DoAccept(const GURL& url,
|
| bool dont_block) const {
|
| + if (dont_block) {
|
| + ExternalProtocolHandler::SetBlockState(url.scheme(),
|
| + ExternalProtocolHandler::DONT_BLOCK);
|
| + }
|
| +
|
| content::WebContents* web_contents = tab_util::GetWebContentsByID(
|
| render_process_host_id_, render_view_routing_id_);
|
| -
|
| - if (dont_block) {
|
| - Profile* profile =
|
| - Profile::FromBrowserContext(web_contents->GetBrowserContext());
|
| -
|
| - ExternalProtocolHandler::SetBlockState(
|
| - url.scheme(), ExternalProtocolHandler::DONT_BLOCK, profile);
|
| - }
|
|
|
| ExternalProtocolHandler::LaunchUrlWithoutSecurityCheck(url, web_contents);
|
| }
|
| @@ -79,12 +75,7 @@
|
| void ExternalProtocolDialogDelegate::DoCancel(const GURL& url,
|
| bool dont_block) const {
|
| if (dont_block) {
|
| - content::WebContents* web_contents = tab_util::GetWebContentsByID(
|
| - render_process_host_id_, render_view_routing_id_);
|
| - Profile* profile =
|
| - Profile::FromBrowserContext(web_contents->GetBrowserContext());
|
| -
|
| - ExternalProtocolHandler::SetBlockState(
|
| - url.scheme(), ExternalProtocolHandler::BLOCK, profile);
|
| + ExternalProtocolHandler::SetBlockState(url.scheme(),
|
| + ExternalProtocolHandler::BLOCK);
|
| }
|
| }
|
|
|