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 | 4 |
5 #ifndef CHROME_COMMON_EXTENSIONS_URL_PATTERN_SET_H_ | 5 #ifndef CHROME_COMMON_EXTENSIONS_URL_PATTERN_SET_H_ |
6 #define CHROME_COMMON_EXTENSIONS_URL_PATTERN_SET_H_ | 6 #define CHROME_COMMON_EXTENSIONS_URL_PATTERN_SET_H_ |
7 | 7 |
8 #include <set> | 8 #include <set> |
9 | 9 |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
75 bool MatchesSecurityOrigin(const GURL& origin) const; | 75 bool MatchesSecurityOrigin(const GURL& origin) const; |
76 | 76 |
77 // Returns true if there is a single URL that would be in two extents. | 77 // Returns true if there is a single URL that would be in two extents. |
78 bool OverlapsWith(const URLPatternSet& other) const; | 78 bool OverlapsWith(const URLPatternSet& other) const; |
79 | 79 |
80 // Converts to and from Value for serialization to preferences. | 80 // Converts to and from Value for serialization to preferences. |
81 scoped_ptr<base::ListValue> ToValue() const; | 81 scoped_ptr<base::ListValue> ToValue() const; |
82 bool Populate(const base::ListValue& value, | 82 bool Populate(const base::ListValue& value, |
83 int valid_schemes, | 83 int valid_schemes, |
84 bool allow_file_access, | 84 bool allow_file_access, |
85 std::string* error); | 85 std::string* error); |
not at google - send to devlin
2012/07/30 15:36:53
check whether we still need this function
chebert
2012/07/30 22:45:19
This is used in the PopulateURLPatterns method. Se
| |
86 | 86 |
87 bool Populate(const std::vector<std::string>& patterns, | |
88 int valid_schemes, | |
89 bool allow_file_access, | |
90 std::string* error); | |
91 | |
87 private: | 92 private: |
88 // The list of URL patterns that comprise the extent. | 93 // The list of URL patterns that comprise the extent. |
89 std::set<URLPattern> patterns_; | 94 std::set<URLPattern> patterns_; |
90 }; | 95 }; |
91 | 96 |
92 #endif // CHROME_COMMON_EXTENSIONS_URL_PATTERN_SET_H_ | 97 #endif // CHROME_COMMON_EXTENSIONS_URL_PATTERN_SET_H_ |
OLD | NEW |