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

Side by Side Diff: third_party/WebKit/Source/modules/navigatorcontentutils/NavigatorContentUtils.cpp

Issue 2378773003: Add version control URI schemes to registerProtocolHandler safelist
Patch Set: Created 4 years, 2 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 unified diff | Download patch
« no previous file with comments | « third_party/WebKit/LayoutTests/http/tests/navigatorcontentutils/unregister-protocol-handler.html ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 26 matching lines...) Expand all
37 37
38 namespace blink { 38 namespace blink {
39 39
40 static HashSet<String>* schemeWhitelist; 40 static HashSet<String>* schemeWhitelist;
41 41
42 static void initCustomSchemeHandlerWhitelist() 42 static void initCustomSchemeHandlerWhitelist()
43 { 43 {
44 schemeWhitelist = new HashSet<String>; 44 schemeWhitelist = new HashSet<String>;
45 static const char* const schemes[] = { 45 static const char* const schemes[] = {
46 "bitcoin", 46 "bitcoin",
47 "bzr"
48 "bzr+ftp"
49 "bzr+http"
50 "bzr+https"
51 "bzr+lp"
52 "bzr+sftp"
53 "bzr+ssh"
54 "cvs"
55 "cvs+ext"
56 "cvs+pserver"
57 "cvs+ssh"
58 "darcs+http"
59 "darcs+https"
60 "darcs+ssh"
47 "geo", 61 "geo",
62 "git"
63 "git+http"
64 "git+https"
65 "git+ssh"
66 "hg"
67 "hg+http"
68 "hg+https"
69 "hg+ssh"
70 "hg+static-http"
48 "im", 71 "im",
49 "irc", 72 "irc",
50 "ircs", 73 "ircs",
74 "lp"
51 "magnet", 75 "magnet",
52 "mailto", 76 "mailto",
53 "mms", 77 "mms",
54 "news", 78 "news",
55 "nntp", 79 "nntp",
56 "openpgp4fpr", 80 "openpgp4fpr",
57 "sip", 81 "sip",
58 "sms", 82 "sms",
59 "smsto", 83 "smsto",
60 "ssh", 84 "ssh",
85 "svn"
86 "svn+http"
87 "svn+https"
88 "svn+ssh"
61 "tel", 89 "tel",
62 "urn", 90 "urn",
63 "webcal", 91 "webcal",
64 "wtai", 92 "wtai",
65 "xmpp", 93 "xmpp",
66 }; 94 };
67 for (size_t i = 0; i < WTF_ARRAY_LENGTH(schemes); ++i) 95 for (size_t i = 0; i < WTF_ARRAY_LENGTH(schemes); ++i)
68 schemeWhitelist->add(schemes[i]); 96 schemeWhitelist->add(schemes[i]);
69 } 97 }
70 98
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 { 264 {
237 return "NavigatorContentUtils"; 265 return "NavigatorContentUtils";
238 } 266 }
239 267
240 void provideNavigatorContentUtilsTo(LocalFrame& frame, NavigatorContentUtilsClie nt* client) 268 void provideNavigatorContentUtilsTo(LocalFrame& frame, NavigatorContentUtilsClie nt* client)
241 { 269 {
242 NavigatorContentUtils::provideTo(frame, NavigatorContentUtils::supplementNam e(), NavigatorContentUtils::create(client)); 270 NavigatorContentUtils::provideTo(frame, NavigatorContentUtils::supplementNam e(), NavigatorContentUtils::create(client));
243 } 271 }
244 272
245 } // namespace blink 273 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/http/tests/navigatorcontentutils/unregister-protocol-handler.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698