| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011, Google Inc. All rights reserved. | 2 * Copyright (C) 2011, Google Inc. All rights reserved. |
| 3 * Copyright (C) 2014, Samsung Electronics. All rights reserved. | 3 * Copyright (C) 2014, Samsung Electronics. All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions are met: | 6 * modification, are permitted provided that the following conditions are met: |
| 7 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 29 matching lines...) Expand all Loading... |
| 40 static HashSet<String>* schemeWhitelist; | 40 static HashSet<String>* schemeWhitelist; |
| 41 | 41 |
| 42 static void initCustomSchemeHandlerWhitelist() { | 42 static void initCustomSchemeHandlerWhitelist() { |
| 43 schemeWhitelist = new HashSet<String>; | 43 schemeWhitelist = new HashSet<String>; |
| 44 static const char* const schemes[] = { | 44 static const char* const schemes[] = { |
| 45 "bitcoin", "geo", "im", "irc", "ircs", "magnet", "mailto", | 45 "bitcoin", "geo", "im", "irc", "ircs", "magnet", "mailto", |
| 46 "mms", "news", "nntp", "openpgp4fpr", "sip", "sms", "smsto", | 46 "mms", "news", "nntp", "openpgp4fpr", "sip", "sms", "smsto", |
| 47 "ssh", "tel", "urn", "webcal", "wtai", "xmpp", | 47 "ssh", "tel", "urn", "webcal", "wtai", "xmpp", |
| 48 }; | 48 }; |
| 49 for (size_t i = 0; i < WTF_ARRAY_LENGTH(schemes); ++i) | 49 for (size_t i = 0; i < WTF_ARRAY_LENGTH(schemes); ++i) |
| 50 schemeWhitelist->add(schemes[i]); | 50 schemeWhitelist->insert(schemes[i]); |
| 51 } | 51 } |
| 52 | 52 |
| 53 static bool verifyCustomHandlerURL(const Document& document, | 53 static bool verifyCustomHandlerURL(const Document& document, |
| 54 const String& url, | 54 const String& url, |
| 55 ExceptionState& exceptionState) { | 55 ExceptionState& exceptionState) { |
| 56 // The specification requires that it is a SyntaxError if the "%s" token is | 56 // The specification requires that it is a SyntaxError if the "%s" token is |
| 57 // not present. | 57 // not present. |
| 58 static const char token[] = "%s"; | 58 static const char token[] = "%s"; |
| 59 int index = url.find(token); | 59 int index = url.find(token); |
| 60 if (-1 == index) { | 60 if (-1 == index) { |
| (...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 240 } | 240 } |
| 241 | 241 |
| 242 void NavigatorContentUtils::provideTo(Navigator& navigator, | 242 void NavigatorContentUtils::provideTo(Navigator& navigator, |
| 243 NavigatorContentUtilsClient* client) { | 243 NavigatorContentUtilsClient* client) { |
| 244 Supplement<Navigator>::provideTo( | 244 Supplement<Navigator>::provideTo( |
| 245 navigator, NavigatorContentUtils::supplementName(), | 245 navigator, NavigatorContentUtils::supplementName(), |
| 246 new NavigatorContentUtils(navigator, client)); | 246 new NavigatorContentUtils(navigator, client)); |
| 247 } | 247 } |
| 248 | 248 |
| 249 } // namespace blink | 249 } // namespace blink |
| OLD | NEW |