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

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

Issue 18548003: Rename ExceptionCode constants to use the names in the spec (2/3) (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 6 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
« no previous file with comments | « Source/modules/mediastream/RTCSessionDescription.cpp ('k') | Source/modules/notifications/Notification.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/navigatorcontentutils/NavigatorContentUtils.cpp
diff --git a/Source/modules/navigatorcontentutils/NavigatorContentUtils.cpp b/Source/modules/navigatorcontentutils/NavigatorContentUtils.cpp
index f90f07c7948593017a51986a8f1abe211f28e6bf..3f73db5f9c7fbaf301a1a395e37bb3b9c2e195ea 100644
--- a/Source/modules/navigatorcontentutils/NavigatorContentUtils.cpp
+++ b/Source/modules/navigatorcontentutils/NavigatorContentUtils.cpp
@@ -67,16 +67,16 @@ static void initProtocolHandlerWhitelist()
static bool verifyCustomHandlerURL(const String& baseURL, const String& url, ExceptionCode& ec)
{
- // The specification requires that it is a SYNTAX_ERR if the "%s" token is
+ // The specification requires that it is a SyntaxError if the "%s" token is
// not present.
static const char token[] = "%s";
int index = url.find(token);
if (-1 == index) {
- ec = SYNTAX_ERR;
+ ec = SyntaxError;
return false;
}
- // It is also a SYNTAX_ERR if the custom handler URL, as created by removing
+ // It is also a SyntaxError if the custom handler URL, as created by removing
// the "%s" token and prepending the base url, does not resolve.
String newURL = url;
newURL.remove(index, WTF_ARRAY_LENGTH(token) - 1);
@@ -85,7 +85,7 @@ static bool verifyCustomHandlerURL(const String& baseURL, const String& url, Exc
KURL kurl(base, newURL);
if (kurl.isEmpty() || !kurl.isValid()) {
- ec = SYNTAX_ERR;
+ ec = SyntaxError;
return false;
}
@@ -104,13 +104,13 @@ static bool verifyProtocolHandlerScheme(const String& scheme, ExceptionCode& ec)
if (scheme.startsWith("web+")) {
if (isValidProtocol(scheme))
return true;
- ec = SECURITY_ERR;
+ ec = SecurityError;
return false;
}
if (isProtocolWhitelisted(scheme))
return true;
- ec = SECURITY_ERR;
+ ec = SecurityError;
return false;
}
« no previous file with comments | « Source/modules/mediastream/RTCSessionDescription.cpp ('k') | Source/modules/notifications/Notification.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698