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

Unified Diff: chrome/common/extensions/url_pattern_set.cc

Issue 7003098: Start refractoring extension permissions into ExtensionPermissionSet. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: See if rebasing fixes the tests... Created 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/common/extensions/url_pattern_set.h ('k') | chrome/common/extensions/url_pattern_set_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/extensions/url_pattern_set.cc
diff --git a/chrome/common/extensions/url_pattern_set.cc b/chrome/common/extensions/url_pattern_set.cc
index c8374ef65c3c6b59a307a5af258ad546694fb749..65f8635d2bb873880ecba1097646eff7b320c206 100644
--- a/chrome/common/extensions/url_pattern_set.cc
+++ b/chrome/common/extensions/url_pattern_set.cc
@@ -7,6 +7,22 @@
#include "chrome/common/extensions/url_pattern.h"
#include "googleurl/src/gurl.h"
+// static
+void URLPatternSet::CreateUnion(const URLPatternSet& set1,
+ const URLPatternSet& set2,
+ URLPatternSet* out) {
+ const URLPatternList list1 = set1.patterns();
+ const URLPatternList list2 = set2.patterns();
+
+ out->ClearPatterns();
+
+ for (size_t i = 0; i < list1.size(); ++i)
+ out->AddPattern(list1.at(i));
+
+ for (size_t i = 0; i < list2.size(); ++i)
+ out->AddPattern(list2.at(i));
+}
+
URLPatternSet::URLPatternSet() {
}
« no previous file with comments | « chrome/common/extensions/url_pattern_set.h ('k') | chrome/common/extensions/url_pattern_set_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698