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

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

Issue 300573002: Add stream operators for URLPattern and URLPatternSet and unit test for URLPatternSet (Closed) Base URL: https://chromium.googlesource.com/chromium/src@permissions
Patch Set: Review comments Created 6 years, 6 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
« no previous file with comments | « no previous file | extensions/common/url_pattern.cc » ('j') | extensions/common/url_pattern_set.h » ('J')
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 <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 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 std::string path_; 232 std::string path_;
232 233
233 // The path with "?" and "\" characters escaped for use with the 234 // The path with "?" and "\" characters escaped for use with the
234 // MatchPattern() function. 235 // MatchPattern() function.
235 std::string path_escaped_; 236 std::string path_escaped_;
236 237
237 // A string representing this URLPattern. 238 // A string representing this URLPattern.
238 mutable std::string spec_; 239 mutable std::string spec_;
239 }; 240 };
240 241
242 std::ostream& operator<<(std::ostream& out, const URLPattern& url_pattern);
243
241 typedef std::vector<URLPattern> URLPatternList; 244 typedef std::vector<URLPattern> URLPatternList;
242 245
243 #endif // EXTENSIONS_COMMON_URL_PATTERN_H_ 246 #endif // EXTENSIONS_COMMON_URL_PATTERN_H_
OLDNEW
« no previous file with comments | « no previous file | extensions/common/url_pattern.cc » ('j') | extensions/common/url_pattern_set.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698