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

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

Issue 3039005: Fix some issues with extensions: (Closed)
Patch Set: fix host perms Created 10 years, 5 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) 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
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
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_
OLDNEW
« no previous file with comments | « chrome/common/extensions/extension_extent_unittest.cc ('k') | chrome/common/extensions/url_pattern_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698