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

Unified Diff: Source/modules/navigatorcontentutils/NavigatorContentUtils.cpp

Issue 133273030: Change a WebString type of url parameter with WebURL (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 11 months 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: Source/modules/navigatorcontentutils/NavigatorContentUtils.cpp
diff --git a/Source/modules/navigatorcontentutils/NavigatorContentUtils.cpp b/Source/modules/navigatorcontentutils/NavigatorContentUtils.cpp
index 745b902179d042dbc1148c4bcda874e6feb5896a..fd3a37f1eb94a1f7ca3472d21eb4ebe4b6cec92e 100644
--- a/Source/modules/navigatorcontentutils/NavigatorContentUtils.cpp
+++ b/Source/modules/navigatorcontentutils/NavigatorContentUtils.cpp
@@ -143,15 +143,15 @@ void NavigatorContentUtils::registerProtocolHandler(Navigator* navigator, const
if (!document)
return;
- String baseURL = document->baseURL().baseAsString();
+ KURL baseURL = document->baseURL();
- if (!verifyCustomHandlerURL(baseURL, url, exceptionState))
+ if (!verifyCustomHandlerURL(baseURL.string(), url, exceptionState))
jochen (gone - plz use gerrit) 2014/01/20 09:21:38 should verifyCustomHandlerURL take a URL as first
gyuyoung-inactive 2014/01/21 02:17:14 Ok, I modify it to use KURL. BTW, don't you think
return;
if (!verifyProtocolHandlerScheme(scheme, "registerProtocolHandler", exceptionState))
return;
- NavigatorContentUtils::from(navigator->frame()->page())->client()->registerProtocolHandler(scheme, baseURL, url, title);
+ NavigatorContentUtils::from(navigator->frame()->page())->client()->registerProtocolHandler(scheme, baseURL, KURL(ParsedURLString, url), title);
}
static String customHandlersStateString(const NavigatorContentUtilsClient::CustomHandlersState state)
@@ -181,15 +181,15 @@ String NavigatorContentUtils::isProtocolHandlerRegistered(Navigator* navigator,
return declined;
Document* document = navigator->frame()->document();
- String baseURL = document->baseURL().baseAsString();
+ KURL baseURL = document->baseURL();
- if (!verifyCustomHandlerURL(baseURL, url, exceptionState))
+ if (!verifyCustomHandlerURL(baseURL.string(), url, exceptionState))
return declined;
if (!verifyProtocolHandlerScheme(scheme, "isProtocolHandlerRegistered", exceptionState))
return declined;
- return customHandlersStateString(NavigatorContentUtils::from(navigator->frame()->page())->client()->isProtocolHandlerRegistered(scheme, baseURL, url));
+ return customHandlersStateString(NavigatorContentUtils::from(navigator->frame()->page())->client()->isProtocolHandlerRegistered(scheme, baseURL, KURL(ParsedURLString, url)));
}
void NavigatorContentUtils::unregisterProtocolHandler(Navigator* navigator, const String& scheme, const String& url, ExceptionState& exceptionState)
@@ -198,15 +198,15 @@ void NavigatorContentUtils::unregisterProtocolHandler(Navigator* navigator, cons
return;
Document* document = navigator->frame()->document();
- String baseURL = document->baseURL().baseAsString();
+ KURL baseURL = document->baseURL();
- if (!verifyCustomHandlerURL(baseURL, url, exceptionState))
+ if (!verifyCustomHandlerURL(baseURL.string(), url, exceptionState))
return;
if (!verifyProtocolHandlerScheme(scheme, "unregisterProtocolHandler", exceptionState))
return;
- NavigatorContentUtils::from(navigator->frame()->page())->client()->unregisterProtocolHandler(scheme, baseURL, url);
+ NavigatorContentUtils::from(navigator->frame()->page())->client()->unregisterProtocolHandler(scheme, baseURL, KURL(ParsedURLString, url));
}
const char* NavigatorContentUtils::supplementName()
« no previous file with comments | « no previous file | Source/modules/navigatorcontentutils/NavigatorContentUtilsClient.h » ('j') | public/web/WebViewClient.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698