OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #import "chrome/browser/ui/cocoa/external_protocol_dialog.h" | 5 #import "chrome/browser/ui/cocoa/external_protocol_dialog.h" |
6 | 6 |
7 #include "base/message_loop/message_loop.h" | 7 #include "base/message_loop/message_loop.h" |
8 #include "base/metrics/histogram_macros.h" | 8 #include "base/metrics/histogram_macros.h" |
9 #include "chrome/browser/external_protocol/external_protocol_handler.h" | 9 #include "chrome/browser/external_protocol/external_protocol_handler.h" |
10 #include "chrome/browser/shell_integration.h" | 10 #include "chrome/browser/shell_integration.h" |
| 11 #include "chrome/browser/tab_contents/tab_util.h" |
11 #include "chrome/grit/chromium_strings.h" | 12 #include "chrome/grit/chromium_strings.h" |
12 #include "chrome/grit/generated_resources.h" | 13 #include "chrome/grit/generated_resources.h" |
13 #include "components/strings/grit/components_strings.h" | 14 #include "components/strings/grit/components_strings.h" |
14 #include "ui/base/l10n/l10n_util_mac.h" | 15 #include "ui/base/l10n/l10n_util_mac.h" |
15 #include "ui/gfx/text_elider.h" | 16 #include "ui/gfx/text_elider.h" |
16 | 17 |
17 /////////////////////////////////////////////////////////////////////////////// | 18 /////////////////////////////////////////////////////////////////////////////// |
18 // ExternalProtocolHandler | 19 // ExternalProtocolHandler |
19 | 20 |
20 // static | 21 // static |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
110 ExternalProtocolHandler::SetBlockState(url_.scheme(), blockState); | 111 ExternalProtocolHandler::SetBlockState(url_.scheme(), blockState); |
111 ExternalProtocolHandler::RecordMetrics(true); | 112 ExternalProtocolHandler::RecordMetrics(true); |
112 } else { | 113 } else { |
113 ExternalProtocolHandler::RecordMetrics(false); | 114 ExternalProtocolHandler::RecordMetrics(false); |
114 } | 115 } |
115 | 116 |
116 if (blockState == ExternalProtocolHandler::DONT_BLOCK) { | 117 if (blockState == ExternalProtocolHandler::DONT_BLOCK) { |
117 UMA_HISTOGRAM_LONG_TIMES("clickjacking.launch_url", | 118 UMA_HISTOGRAM_LONG_TIMES("clickjacking.launch_url", |
118 base::Time::Now() - creation_time_); | 119 base::Time::Now() - creation_time_); |
119 | 120 |
120 ExternalProtocolHandler::LaunchUrlWithoutSecurityCheck( | 121 content::WebContents* web_contents = |
121 url_, render_process_host_id_, routing_id_); | 122 tab_util::GetWebContentsByID(render_process_host_id_, routing_id_); |
| 123 |
| 124 ExternalProtocolHandler::LaunchUrlWithoutSecurityCheck(url_, web_contents); |
122 } | 125 } |
123 | 126 |
124 [self autorelease]; | 127 [self autorelease]; |
125 } | 128 } |
126 | 129 |
127 @end | 130 @end |
OLD | NEW |