| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/ui/external_protocol_dialog_delegate.h" | 5 #include "chrome/browser/ui/external_protocol_dialog_delegate.h" |
| 6 | 6 |
| 7 #include "chrome/browser/external_protocol/external_protocol_handler.h" | 7 #include "chrome/browser/external_protocol/external_protocol_handler.h" |
| 8 #include "chrome/browser/tab_contents/tab_util.h" | 8 #include "chrome/browser/tab_contents/tab_util.h" |
| 9 #include "chrome/grit/chromium_strings.h" | 9 #include "chrome/grit/chromium_strings.h" |
| 10 #include "chrome/grit/generated_resources.h" | 10 #include "chrome/grit/generated_resources.h" |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 | 68 |
| 69 content::WebContents* web_contents = tab_util::GetWebContentsByID( | 69 content::WebContents* web_contents = tab_util::GetWebContentsByID( |
| 70 render_process_host_id_, render_view_routing_id_); | 70 render_process_host_id_, render_view_routing_id_); |
| 71 | 71 |
| 72 ExternalProtocolHandler::LaunchUrlWithoutSecurityCheck(url, web_contents); | 72 ExternalProtocolHandler::LaunchUrlWithoutSecurityCheck(url, web_contents); |
| 73 } | 73 } |
| 74 | 74 |
| 75 void ExternalProtocolDialogDelegate::DoCancel(const GURL& url, | 75 void ExternalProtocolDialogDelegate::DoCancel(const GURL& url, |
| 76 bool dont_block) const { | 76 bool dont_block) const { |
| 77 if (dont_block) { | 77 if (dont_block) { |
| 78 content::WebContents* web_contents = tab_util::GetWebContentsByID( |
| 79 render_process_host_id_, render_view_routing_id_); |
| 80 Profile* profile = |
| 81 Profile::FromBrowserContext(web_contents->GetBrowserContext()); |
| 82 |
| 78 ExternalProtocolHandler::SetBlockState(url.scheme(), | 83 ExternalProtocolHandler::SetBlockState(url.scheme(), |
| 79 ExternalProtocolHandler::BLOCK); | 84 ExternalProtocolHandler::BLOCK, |
| 85 profile); |
| 80 } | 86 } |
| 81 } | 87 } |
| OLD | NEW |