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

Side by Side Diff: extensions/common/url_pattern.h

Issue 2449913002: Support WebSocket in WebRequest API. (Closed)
Patch Set: Refactor tests; add test; update documentation. Created 3 years, 10 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #ifndef EXTENSIONS_COMMON_URL_PATTERN_H_ 4 #ifndef EXTENSIONS_COMMON_URL_PATTERN_H_
5 #define EXTENSIONS_COMMON_URL_PATTERN_H_ 5 #define EXTENSIONS_COMMON_URL_PATTERN_H_
6 6
7 #include <functional> 7 #include <functional>
8 #include <iosfwd> 8 #include <iosfwd>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 // A collection of scheme bitmasks for use with valid_schemes. 48 // A collection of scheme bitmasks for use with valid_schemes.
49 enum SchemeMasks { 49 enum SchemeMasks {
50 SCHEME_NONE = 0, 50 SCHEME_NONE = 0,
51 SCHEME_HTTP = 1 << 0, 51 SCHEME_HTTP = 1 << 0,
52 SCHEME_HTTPS = 1 << 1, 52 SCHEME_HTTPS = 1 << 1,
53 SCHEME_FILE = 1 << 2, 53 SCHEME_FILE = 1 << 2,
54 SCHEME_FTP = 1 << 3, 54 SCHEME_FTP = 1 << 3,
55 SCHEME_CHROMEUI = 1 << 4, 55 SCHEME_CHROMEUI = 1 << 4,
56 SCHEME_EXTENSION = 1 << 5, 56 SCHEME_EXTENSION = 1 << 5,
57 SCHEME_FILESYSTEM = 1 << 6, 57 SCHEME_FILESYSTEM = 1 << 6,
58 SCHEME_WS = 1 << 7,
59 SCHEME_WSS = 1 << 8,
58 60
59 // IMPORTANT! 61 // IMPORTANT!
60 // SCHEME_ALL will match every scheme, including chrome://, chrome- 62 // SCHEME_ALL will match every scheme, including chrome://, chrome-
61 // extension://, about:, etc. Because this has lots of security 63 // extension://, about:, etc. Because this has lots of security
62 // implications, third-party extensions should usually not be able to get 64 // implications, third-party extensions should usually not be able to get
63 // access to URL patterns initialized this way. If there is a reason 65 // access to URL patterns initialized this way. If there is a reason
64 // for violating this general rule, document why this it safe. 66 // for violating this general rule, document why this it safe.
65 SCHEME_ALL = -1, 67 SCHEME_ALL = -1,
66 }; 68 };
67 69
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
255 257
256 // A string representing this URLPattern. 258 // A string representing this URLPattern.
257 mutable std::string spec_; 259 mutable std::string spec_;
258 }; 260 };
259 261
260 std::ostream& operator<<(std::ostream& out, const URLPattern& url_pattern); 262 std::ostream& operator<<(std::ostream& out, const URLPattern& url_pattern);
261 263
262 typedef std::vector<URLPattern> URLPatternList; 264 typedef std::vector<URLPattern> URLPatternList;
263 265
264 #endif // EXTENSIONS_COMMON_URL_PATTERN_H_ 266 #endif // EXTENSIONS_COMMON_URL_PATTERN_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698