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

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

Issue 441643009: Merge 285492 "Don't allow null bytes in hosts of host permissions." (Closed) Base URL: svn://svn.chromium.org/chrome/branches/2062/src/
Patch Set: Created 6 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | extensions/common/url_pattern.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 // Error codes returned from Parse(). 65 // Error codes returned from Parse().
66 enum ParseResult { 66 enum ParseResult {
67 PARSE_SUCCESS = 0, 67 PARSE_SUCCESS = 0,
68 PARSE_ERROR_MISSING_SCHEME_SEPARATOR, 68 PARSE_ERROR_MISSING_SCHEME_SEPARATOR,
69 PARSE_ERROR_INVALID_SCHEME, 69 PARSE_ERROR_INVALID_SCHEME,
70 PARSE_ERROR_WRONG_SCHEME_SEPARATOR, 70 PARSE_ERROR_WRONG_SCHEME_SEPARATOR,
71 PARSE_ERROR_EMPTY_HOST, 71 PARSE_ERROR_EMPTY_HOST,
72 PARSE_ERROR_INVALID_HOST_WILDCARD, 72 PARSE_ERROR_INVALID_HOST_WILDCARD,
73 PARSE_ERROR_EMPTY_PATH, 73 PARSE_ERROR_EMPTY_PATH,
74 PARSE_ERROR_INVALID_PORT, 74 PARSE_ERROR_INVALID_PORT,
75 PARSE_ERROR_INVALID_HOST,
75 NUM_PARSE_RESULTS 76 NUM_PARSE_RESULTS
76 }; 77 };
77 78
78 // The <all_urls> string pattern. 79 // The <all_urls> string pattern.
79 static const char kAllUrlsPattern[]; 80 static const char kAllUrlsPattern[];
80 81
81 // Returns true if the given |scheme| is considered valid for extensions. 82 // Returns true if the given |scheme| is considered valid for extensions.
82 static bool IsValidSchemeForExtensions(const std::string& scheme); 83 static bool IsValidSchemeForExtensions(const std::string& scheme);
83 84
84 explicit URLPattern(int valid_schemes); 85 explicit URLPattern(int valid_schemes);
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 // MatchPattern() function. 238 // MatchPattern() function.
238 std::string path_escaped_; 239 std::string path_escaped_;
239 240
240 // A string representing this URLPattern. 241 // A string representing this URLPattern.
241 mutable std::string spec_; 242 mutable std::string spec_;
242 }; 243 };
243 244
244 typedef std::vector<URLPattern> URLPatternList; 245 typedef std::vector<URLPattern> URLPatternList;
245 246
246 #endif // EXTENSIONS_COMMON_URL_PATTERN_H_ 247 #endif // EXTENSIONS_COMMON_URL_PATTERN_H_
OLDNEW
« no previous file with comments | « no previous file | extensions/common/url_pattern.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698