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

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

Issue 10443105: Take 2 at implementing activeTab. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: many more tests Created 8 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #pragma once 7 #pragma once
8 8
9 #include <set> 9 #include <set>
10 10
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 42
43 URLPatternSet(); 43 URLPatternSet();
44 URLPatternSet(const URLPatternSet& rhs); 44 URLPatternSet(const URLPatternSet& rhs);
45 explicit URLPatternSet(const std::set<URLPattern>& patterns); 45 explicit URLPatternSet(const std::set<URLPattern>& patterns);
46 ~URLPatternSet(); 46 ~URLPatternSet();
47 47
48 URLPatternSet& operator=(const URLPatternSet& rhs); 48 URLPatternSet& operator=(const URLPatternSet& rhs);
49 bool operator==(const URLPatternSet& rhs) const; 49 bool operator==(const URLPatternSet& rhs) const;
50 50
51 bool is_empty() const; 51 bool is_empty() const;
52 size_t size() const;
52 const std::set<URLPattern>& patterns() const { return patterns_; } 53 const std::set<URLPattern>& patterns() const { return patterns_; }
53 const_iterator begin() const { return patterns_.begin(); } 54 const_iterator begin() const { return patterns_.begin(); }
54 const_iterator end() const { return patterns_.end(); } 55 const_iterator end() const { return patterns_.end(); }
55 56
56 void AddPattern(const URLPattern& pattern); 57 void AddPattern(const URLPattern& pattern);
57 void ClearPatterns(); 58 void ClearPatterns();
58 59
59 // Returns true if the permission |set| is a subset of this. 60 // Returns true if the permission |set| is a subset of this.
60 bool Contains(const URLPatternSet& set) const; 61 bool Contains(const URLPatternSet& set) const;
61 62
(...skipping 11 matching lines...) Expand all
73 int valid_schemes, 74 int valid_schemes,
74 bool allow_file_access, 75 bool allow_file_access,
75 std::string* error); 76 std::string* error);
76 77
77 private: 78 private:
78 // The list of URL patterns that comprise the extent. 79 // The list of URL patterns that comprise the extent.
79 std::set<URLPattern> patterns_; 80 std::set<URLPattern> patterns_;
80 }; 81 };
81 82
82 #endif // CHROME_COMMON_EXTENSIONS_URL_PATTERN_SET_H_ 83 #endif // CHROME_COMMON_EXTENSIONS_URL_PATTERN_SET_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698