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

Unified Diff: chrome/browser/ui/cocoa/external_protocol_dialog.mm

Issue 107033003: Stop using GetDefaultProfile() in Chrome OS implementation of platform_util::OpenExternal() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove is_valid check Created 7 years 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/ui/cocoa/external_protocol_dialog.mm
diff --git a/chrome/browser/ui/cocoa/external_protocol_dialog.mm b/chrome/browser/ui/cocoa/external_protocol_dialog.mm
index 55259254491527e4ae584e078c7bf19d5d7fbca4..c57d53cbf0c868e0ac37f3da70f82cee1951f312 100644
--- a/chrome/browser/ui/cocoa/external_protocol_dialog.mm
+++ b/chrome/browser/ui/cocoa/external_protocol_dialog.mm
@@ -21,7 +21,9 @@
// static
void ExternalProtocolHandler::RunExternalProtocolDialog(
const GURL& url, int render_process_host_id, int routing_id) {
- [[ExternalProtocolDialogController alloc] initWithGURL:&url];
+ [[ExternalProtocolDialogController alloc] initWithGURL:&url
+ renderProcessHostId:render_process_host_id
+ routingId:routing_id];
}
///////////////////////////////////////////////////////////////////////////////
@@ -35,13 +37,17 @@ void ExternalProtocolHandler::RunExternalProtocolDialog(
@end
@implementation ExternalProtocolDialogController
-- (id)initWithGURL:(const GURL*)url {
+- (id)initWithGURL:(const GURL*)url
+ renderProcessHostId:(int)renderProcessHostId
+ routingId:(int)routingId {
DCHECK_EQ(base::MessageLoop::TYPE_UI, base::MessageLoop::current()->type());
if (!(self = [super init]))
return nil;
url_ = *url;
+ render_process_host_id_ = renderProcessHostId;
+ routing_id_ = routingId;
creation_time_ = base::Time::Now();
base::string16 appName = [self appNameForProtocol];
@@ -127,7 +133,8 @@ void ExternalProtocolHandler::RunExternalProtocolDialog(
UMA_HISTOGRAM_LONG_TIMES("clickjacking.launch_url",
base::Time::Now() - creation_time_);
- ExternalProtocolHandler::LaunchUrlWithoutSecurityCheck(url_);
+ ExternalProtocolHandler::LaunchUrlWithoutSecurityCheck(
+ url_, render_process_host_id_, routing_id_);
}
[self autorelease];
« no previous file with comments | « chrome/browser/ui/cocoa/external_protocol_dialog.h ('k') | chrome/browser/ui/external_protocol_dialog_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698