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

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

Issue 10809094: Context Menus now uses the JSON Schema Compiler. (Closed) Base URL: http://git.chromium.org/chromium/src.git@json_functions_as_properties
Patch Set: * Created 8 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
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 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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
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);
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:
93 bool ParseURLPattern(URLPattern& pattern,
94 const std::string& item,
95 bool allow_file_access,
96 std::string* error);
88 // The list of URL patterns that comprise the extent. 97 // The list of URL patterns that comprise the extent.
89 std::set<URLPattern> patterns_; 98 std::set<URLPattern> patterns_;
90 }; 99 };
91 100
92 #endif // CHROME_COMMON_EXTENSIONS_URL_PATTERN_SET_H_ 101 #endif // CHROME_COMMON_EXTENSIONS_URL_PATTERN_SET_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698