diff options
author | ivandavid@chromium.org <ivandavid@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-05-31 22:36:43 +0000 |
---|---|---|
committer | ivandavid@chromium.org <ivandavid@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-05-31 22:36:43 +0000 |
commit | 99bee642139aead0d903751024f127cab4b02fa6 (patch) | |
tree | 4fb05346a18af726177f190ec5b0f30cc122d1c7 /extensions/common/csp_validator.cc | |
parent | 8cb2949cc4c2506198cee95ac25d1560cf0f11ad (diff) | |
download | chromium_src-99bee642139aead0d903751024f127cab4b02fa6.zip chromium_src-99bee642139aead0d903751024f127cab4b02fa6.tar.gz chromium_src-99bee642139aead0d903751024f127cab4b02fa6.tar.bz2 |
replaced the string 'chrome-extensions://' with constants
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/301033004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@274077 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'extensions/common/csp_validator.cc')
-rw-r--r-- | extensions/common/csp_validator.cc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/extensions/common/csp_validator.cc b/extensions/common/csp_validator.cc index 0ee0116..94f880e 100644 --- a/extensions/common/csp_validator.cc +++ b/extensions/common/csp_validator.cc @@ -9,6 +9,8 @@ #include "base/strings/string_split.h" #include "base/strings/string_tokenizer.h" #include "base/strings/string_util.h" +#include "content/public/common/url_constants.h" +#include "extensions/common/constants.h" namespace extensions { @@ -71,7 +73,10 @@ bool HasOnlySecureTokens(base::StringTokenizer& tokenizer, StartsWithASCII(source, "http://localhost:", false) || StartsWithASCII(source, "https://", true) || StartsWithASCII(source, "chrome://", true) || - StartsWithASCII(source, "chrome-extension://", true) || + StartsWithASCII(source, + std::string(extensions::kExtensionScheme) + + content::kStandardSchemeSeparator, + true) || StartsWithASCII(source, "chrome-extension-resource:", true)) { continue; } |