| OLD | NEW |
| 1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2009 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 CHROME_COMMON_EXTENSIONS_URL_PATTERN_H_ | 4 #ifndef CHROME_COMMON_EXTENSIONS_URL_PATTERN_H_ |
| 5 #define CHROME_COMMON_EXTENSIONS_URL_PATTERN_H_ | 5 #define CHROME_COMMON_EXTENSIONS_URL_PATTERN_H_ |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "googleurl/src/gurl.h" | 10 #include "googleurl/src/gurl.h" |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 // than the original glob, which is probably better than nothing. | 73 // than the original glob, which is probably better than nothing. |
| 74 class URLPattern { | 74 class URLPattern { |
| 75 public: | 75 public: |
| 76 // A collection of scheme bitmasks for use with valid_schemes. | 76 // A collection of scheme bitmasks for use with valid_schemes. |
| 77 enum SchemeMasks { | 77 enum SchemeMasks { |
| 78 SCHEME_HTTP = 1<<0, | 78 SCHEME_HTTP = 1<<0, |
| 79 SCHEME_HTTPS = 1<<1, | 79 SCHEME_HTTPS = 1<<1, |
| 80 SCHEME_FILE = 1<<2, | 80 SCHEME_FILE = 1<<2, |
| 81 SCHEME_FTP = 1<<3, | 81 SCHEME_FTP = 1<<3, |
| 82 SCHEME_CHROMEUI = 1<<4, | 82 SCHEME_CHROMEUI = 1<<4, |
| 83 | |
| 84 SCHEMES_ALL = | |
| 85 SCHEME_HTTP | SCHEME_HTTPS | SCHEME_FILE | SCHEME_FTP | SCHEME_CHROMEUI, | |
| 86 }; | 83 }; |
| 87 | 84 |
| 88 // Note: don't use this directly. This exists so URLPattern can be used | 85 // Note: don't use this directly. This exists so URLPattern can be used |
| 89 // with STL containers. | 86 // with STL containers. |
| 90 URLPattern(); | 87 URLPattern(); |
| 91 | 88 |
| 92 // Construct an URLPattern with the given set of allowable schemes. See | 89 // Construct an URLPattern with the given set of allowable schemes. See |
| 93 // valid_schemes_ for more info. | 90 // valid_schemes_ for more info. |
| 94 explicit URLPattern(int valid_schemes); | 91 explicit URLPattern(int valid_schemes); |
| 95 | 92 |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 190 // everything after the scheme in the case of file:// URLs. | 187 // everything after the scheme in the case of file:// URLs. |
| 191 std::string path_; | 188 std::string path_; |
| 192 | 189 |
| 193 // The path with "?" and "\" characters escaped for use with the | 190 // The path with "?" and "\" characters escaped for use with the |
| 194 // MatchPatternASCII() function. This is populated lazily, the first time it | 191 // MatchPatternASCII() function. This is populated lazily, the first time it |
| 195 // is needed. | 192 // is needed. |
| 196 mutable std::string path_escaped_; | 193 mutable std::string path_escaped_; |
| 197 }; | 194 }; |
| 198 | 195 |
| 199 #endif // CHROME_COMMON_EXTENSIONS_URL_PATTERN_H_ | 196 #endif // CHROME_COMMON_EXTENSIONS_URL_PATTERN_H_ |
| OLD | NEW |