summaryrefslogtreecommitdiffstats
path: root/chrome/common/extensions/user_script.cc
diff options
context:
space:
mode:
authorjstritar@chromium.org <jstritar@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-07-12 19:38:29 +0000
committerjstritar@chromium.org <jstritar@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-07-12 19:38:29 +0000
commit33ccd923b68f5f202230f5a400021f3efd304439 (patch)
treec8c57a6de3b69286738be878683594f40a0c936d /chrome/common/extensions/user_script.cc
parent2261b8bbffdf8abd12837326b0d0676f8eddb744 (diff)
downloadchromium_src-33ccd923b68f5f202230f5a400021f3efd304439.zip
chromium_src-33ccd923b68f5f202230f5a400021f3efd304439.tar.gz
chromium_src-33ccd923b68f5f202230f5a400021f3efd304439.tar.bz2
Update URLPatternSet to contain a std::set instead of std::vector.
This updates URLPatternSet to contain a std::set instead of a std::vector, making it easier to implement the set operations in ExtensionPermissionSet. BUG=84507 TEST=unit_tests Review URL: http://codereview.chromium.org/7347011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@92219 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/extensions/user_script.cc')
-rw-r--r--chrome/common/extensions/user_script.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/chrome/common/extensions/user_script.cc b/chrome/common/extensions/user_script.cc
index 17aadbc..77fd715 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);
}