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

Side by Side Diff: url/gurl.h

Issue 68213017: Fix HTTP protocol scheme debugging checks for WebSockets (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Additional minor #include tweak. Created 7 years, 1 month 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_GURL_H_ 5 #ifndef URL_GURL_H_
6 #define URL_GURL_H_ 6 #define URL_GURL_H_
7 7
8 #include <iosfwd> 8 #include <iosfwd>
9 #include <string> 9 #include <string>
10 10
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 203
204 // Returns true if the given parameter (should be lower-case ASCII to match 204 // Returns true if the given parameter (should be lower-case ASCII to match
205 // the canonicalized scheme) is the scheme for this URL. This call is more 205 // the canonicalized scheme) is the scheme for this URL. This call is more
206 // efficient than getting the scheme and comparing it because no copies or 206 // efficient than getting the scheme and comparing it because no copies or
207 // object constructions are done. 207 // object constructions are done.
208 bool SchemeIs(const char* lower_ascii_scheme) const; 208 bool SchemeIs(const char* lower_ascii_scheme) const;
209 209
210 // Returns true if the scheme is "http" or "https". 210 // Returns true if the scheme is "http" or "https".
211 bool SchemeIsHTTPOrHTTPS() const; 211 bool SchemeIsHTTPOrHTTPS() const;
212 212
213 // Returns true is the scheme is "ws" or "wss".
214 bool SchemeIsWSOrWSS() const;
215
213 // We often need to know if this is a file URL. File URLs are "standard", but 216 // We often need to know if this is a file URL. File URLs are "standard", but
214 // are often treated separately by some programs. 217 // are often treated separately by some programs.
215 bool SchemeIsFile() const { 218 bool SchemeIsFile() const {
216 return SchemeIs("file"); 219 return SchemeIs("file");
217 } 220 }
218 221
219 // FileSystem URLs need to be treated differently in some cases. 222 // FileSystem URLs need to be treated differently in some cases.
220 bool SchemeIsFileSystem() const { 223 bool SchemeIsFileSystem() const {
221 return SchemeIs("filesystem"); 224 return SchemeIs("filesystem");
222 } 225 }
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
378 // Used for nested schemes [currently only filesystem:]. 381 // Used for nested schemes [currently only filesystem:].
379 scoped_ptr<GURL> inner_url_; 382 scoped_ptr<GURL> inner_url_;
380 383
381 // TODO bug 684583: Add encoding for query params. 384 // TODO bug 684583: Add encoding for query params.
382 }; 385 };
383 386
384 // Stream operator so GURL can be used in assertion statements. 387 // Stream operator so GURL can be used in assertion statements.
385 URL_EXPORT std::ostream& operator<<(std::ostream& out, const GURL& url); 388 URL_EXPORT std::ostream& operator<<(std::ostream& out, const GURL& url);
386 389
387 #endif // URL_GURL_H_ 390 #endif // URL_GURL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698