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

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

Issue 7347011: Update URLPatternSet to contain a std::set instead of std::vector. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix windows compile errors. Created 9 years, 5 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/user_script.h ('k') | chrome/common/extensions/user_script_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/extensions/user_script.cc
diff --git a/chrome/common/extensions/user_script.cc b/chrome/common/extensions/user_script.cc
index 17aadbc1c74f408c90c7d3bd63e8a3c793650b7e..77fd715410c9c450556ddfe587fe047c7ddd03c2 100644
--- a/chrome/common/extensions/user_script.cc
+++ b/chrome/common/extensions/user_script.cc
@@ -121,9 +121,9 @@ void UserScript::Pickle(::Pickle* pickle) const {
}
// Write url patterns.
- URLPatternList pattern_list = url_set_.patterns();
- pickle->WriteSize(pattern_list.size());
- for (URLPatternList::const_iterator pattern = pattern_list.begin();
+ URLPatternSet pattern_list = url_set_;
+ pickle->WriteSize(pattern_list.patterns().size());
+ for (URLPatternSet::const_iterator pattern = pattern_list.begin();
pattern != pattern_list.end(); ++pattern) {
pickle->WriteInt(pattern->valid_schemes());
pickle->WriteString(pattern->GetAsString());
@@ -191,11 +191,11 @@ void UserScript::Unpickle(const ::Pickle& pickle, void** iter) {
// pattern so that it's valid.
bool had_file_scheme = (valid_schemes & URLPattern::SCHEME_FILE) != 0;
if (!had_file_scheme)
- pattern.set_valid_schemes(valid_schemes | URLPattern::SCHEME_FILE);
+ pattern.SetValidSchemes(valid_schemes | URLPattern::SCHEME_FILE);
CHECK(URLPattern::PARSE_SUCCESS ==
pattern.Parse(pattern_str, URLPattern::IGNORE_PORTS));
if (!had_file_scheme)
- pattern.set_valid_schemes(valid_schemes);
+ pattern.SetValidSchemes(valid_schemes);
url_set_.AddPattern(pattern);
}
« no previous file with comments | « chrome/common/extensions/user_script.h ('k') | chrome/common/extensions/user_script_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698