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 20:25:22 +0000
committerjstritar@chromium.org <jstritar@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-07-12 20:25:22 +0000
commitb791effd60d54492f0e7cacf4c10d286fcd76ffe (patch)
treed14aa43185a3f2c04951e1fd68c49bdf60e5ecd0 /chrome/common/extensions/user_script.cc
parentf760afdeb4ce5e734c605719be2e66de048c5555 (diff)
downloadchromium_src-b791effd60d54492f0e7cacf4c10d286fcd76ffe.zip
chromium_src-b791effd60d54492f0e7cacf4c10d286fcd76ffe.tar.gz
chromium_src-b791effd60d54492f0e7cacf4c10d286fcd76ffe.tar.bz2
Revert 92219 - 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 TBR=jstritar@chromium.org Review URL: http://codereview.chromium.org/7346019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@92224 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 77fd715..17aadbc 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.
- URLPatternSet pattern_list = url_set_;
- pickle->WriteSize(pattern_list.patterns().size());
- for (URLPatternSet::const_iterator pattern = pattern_list.begin();
+ URLPatternList pattern_list = url_set_.patterns();
+ pickle->WriteSize(pattern_list.size());
+ for (URLPatternList::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.SetValidSchemes(valid_schemes | URLPattern::SCHEME_FILE);
+ pattern.set_valid_schemes(valid_schemes | URLPattern::SCHEME_FILE);
CHECK(URLPattern::PARSE_SUCCESS ==
pattern.Parse(pattern_str, URLPattern::IGNORE_PORTS));
if (!had_file_scheme)
- pattern.SetValidSchemes(valid_schemes);
+ pattern.set_valid_schemes(valid_schemes);
url_set_.AddPattern(pattern);
}