OLD | NEW |
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 <string> | 9 #include <string> |
9 #include <vector> | 10 #include <vector> |
10 | 11 |
11 class GURL; | 12 class GURL; |
12 | 13 |
13 // A pattern that can be used to match URLs. A URLPattern is a very restricted | 14 // A pattern that can be used to match URLs. A URLPattern is a very restricted |
14 // subset of URL syntax: | 15 // subset of URL syntax: |
15 // | 16 // |
16 // <url-pattern> := <scheme>://<host><port><path> | '<all_urls>' | 17 // <url-pattern> := <scheme>://<host><port><path> | '<all_urls>' |
17 // <scheme> := '*' | 'http' | 'https' | 'file' | 'ftp' | 'chrome' | | 18 // <scheme> := '*' | 'http' | 'https' | 'file' | 'ftp' | 'chrome' | |
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
241 std::string path_; | 242 std::string path_; |
242 | 243 |
243 // The path with "?" and "\" characters escaped for use with the | 244 // The path with "?" and "\" characters escaped for use with the |
244 // MatchPattern() function. | 245 // MatchPattern() function. |
245 std::string path_escaped_; | 246 std::string path_escaped_; |
246 | 247 |
247 // A string representing this URLPattern. | 248 // A string representing this URLPattern. |
248 mutable std::string spec_; | 249 mutable std::string spec_; |
249 }; | 250 }; |
250 | 251 |
| 252 std::ostream& operator<<(std::ostream& out, const URLPattern& url_pattern); |
| 253 |
251 typedef std::vector<URLPattern> URLPatternList; | 254 typedef std::vector<URLPattern> URLPatternList; |
252 | 255 |
253 #endif // EXTENSIONS_COMMON_URL_PATTERN_H_ | 256 #endif // EXTENSIONS_COMMON_URL_PATTERN_H_ |
OLD | NEW |