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

Side by Side Diff: url/url_util.h

Issue 2760463005: Fix handling of external protocols with PlzNavigate. (Closed)
Patch Set: review comments Created 3 years, 9 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef URL_URL_UTIL_H_ 5 #ifndef URL_URL_UTIL_H_
6 #define URL_URL_UTIL_H_ 6 #define URL_URL_UTIL_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 // web (e.g. application's internal schemes) or schemes that are used on web but 102 // web (e.g. application's internal schemes) or schemes that are used on web but
103 // cannot store data. 103 // cannot store data.
104 URL_EXPORT void AddWebStorageScheme(const char* new_scheme); 104 URL_EXPORT void AddWebStorageScheme(const char* new_scheme);
105 URL_EXPORT const std::vector<std::string>& GetWebStorageSchemes(); 105 URL_EXPORT const std::vector<std::string>& GetWebStorageSchemes();
106 106
107 // Adds an application-defined scheme to the list of schemes that can bypass the 107 // Adds an application-defined scheme to the list of schemes that can bypass the
108 // Content-Security-Policy(CSP) checks. 108 // Content-Security-Policy(CSP) checks.
109 URL_EXPORT void AddCSPBypassingScheme(const char* new_scheme); 109 URL_EXPORT void AddCSPBypassingScheme(const char* new_scheme);
110 URL_EXPORT const std::vector<std::string>& GetCSPBypassingSchemes(); 110 URL_EXPORT const std::vector<std::string>& GetCSPBypassingSchemes();
111 111
112 // Adds an application-defined scheme to the list of schemes that are strictly
113 // empty documents, allowing them to commit synchronously.
114 URL_EXPORT void AddEmptyDocumentScheme(const char* new_scheme);
115 URL_EXPORT const std::vector<std::string>& GetEmptyDocumentSchemes();
116
112 // Sets a flag to prevent future calls to Add*Scheme from succeeding. 117 // Sets a flag to prevent future calls to Add*Scheme from succeeding.
113 // 118 //
114 // This is designed to help prevent errors for multithreaded applications. 119 // This is designed to help prevent errors for multithreaded applications.
115 // Normal usage would be to call Add*Scheme for your custom schemes at 120 // Normal usage would be to call Add*Scheme for your custom schemes at
116 // the beginning of program initialization, and then LockSchemeRegistries. This 121 // the beginning of program initialization, and then LockSchemeRegistries. This
117 // prevents future callers from mistakenly calling Add*Scheme when the 122 // prevents future callers from mistakenly calling Add*Scheme when the
118 // program is running with multiple threads, where such usage would be 123 // program is running with multiple threads, where such usage would be
119 // dangerous. 124 // dangerous.
120 // 125 //
121 // We could have had Add*Scheme use a lock instead, but that would add 126 // We could have had Add*Scheme use a lock instead, but that would add
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
264 269
265 // Escapes the given string as defined by the JS method encodeURIComponent. See 270 // Escapes the given string as defined by the JS method encodeURIComponent. See
266 // https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/encodeUR IComponent 271 // https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/encodeUR IComponent
267 URL_EXPORT void EncodeURIComponent(const char* input, 272 URL_EXPORT void EncodeURIComponent(const char* input,
268 int length, 273 int length,
269 CanonOutput* output); 274 CanonOutput* output);
270 275
271 } // namespace url 276 } // namespace url
272 277
273 #endif // URL_URL_UTIL_H_ 278 #endif // URL_URL_UTIL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698