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

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

Issue 8885022: Move URLPattern::ParseOption into a field. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: more minor sprucing Created 9 years 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/url_pattern_unittest.cc ('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 77fd715410c9c450556ddfe587fe047c7ddd03c2..ca86b9224157dc88d641634e40860b89dee199b5 100644
--- a/chrome/common/extensions/user_script.cc
+++ b/chrome/common/extensions/user_script.cc
@@ -183,7 +183,7 @@ void UserScript::Unpickle(const ::Pickle& pickle, void** iter) {
int valid_schemes;
CHECK(pickle.ReadInt(iter, &valid_schemes));
std::string pattern_str;
- URLPattern pattern(valid_schemes);
+ URLPattern pattern(URLPattern::IGNORE_PORTS, valid_schemes);
CHECK(pickle.ReadString(iter, &pattern_str));
// We remove the file scheme if it's not actually allowed (see Extension::
@@ -192,8 +192,7 @@ void UserScript::Unpickle(const ::Pickle& pickle, void** iter) {
bool had_file_scheme = (valid_schemes & URLPattern::SCHEME_FILE) != 0;
if (!had_file_scheme)
pattern.SetValidSchemes(valid_schemes | URLPattern::SCHEME_FILE);
- CHECK(URLPattern::PARSE_SUCCESS ==
- pattern.Parse(pattern_str, URLPattern::IGNORE_PORTS));
+ CHECK(URLPattern::PARSE_SUCCESS == pattern.Parse(pattern_str));
if (!had_file_scheme)
pattern.SetValidSchemes(valid_schemes);
« no previous file with comments | « chrome/common/extensions/url_pattern_unittest.cc ('k') | chrome/common/extensions/user_script_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698