summaryrefslogtreecommitdiffstats
path: root/chrome/browser/extensions/crx_installer.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/browser/extensions/crx_installer.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/browser/extensions/crx_installer.cc')
-rw-r--r--chrome/browser/extensions/crx_installer.cc11
1 files changed, 5 insertions, 6 deletions
diff --git a/chrome/browser/extensions/crx_installer.cc b/chrome/browser/extensions/crx_installer.cc
index a1e3863..3581571 100644
--- a/chrome/browser/extensions/crx_installer.cc
+++ b/chrome/browser/extensions/crx_installer.cc
@@ -283,13 +283,12 @@ bool CrxInstaller::AllowInstall(const Extension* extension,
// host (or a subdomain of the host) the download happened from. There's
// no way for us to verify that the app controls any other hosts.
URLPattern pattern(UserScript::kValidUserScriptSchemes);
- pattern.SetHost(original_url_.host());
- pattern.SetMatchSubdomains(true);
+ pattern.set_host(original_url_.host());
+ pattern.set_match_subdomains(true);
- URLPatternSet patterns = extension_->web_extent();
- for (URLPatternSet::const_iterator i = patterns.begin();
- i != patterns.end(); ++i) {
- if (!pattern.MatchesHost(i->host())) {
+ URLPatternList patterns = extension_->web_extent().patterns();
+ for (size_t i = 0; i < patterns.size(); ++i) {
+ if (!pattern.MatchesHost(patterns[i].host())) {
*error = base::StringPrintf(
"Apps must be served from the host that they affect.");
return false;