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

Unified Diff: extensions/browser/api/declarative_webrequest/webrequest_condition_attribute.cc

Issue 1865303006: Map webRequest filter type to multiple internal ResourceTypes if needed (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2661
Patch Set: Created 4 years, 8 months 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
Index: extensions/browser/api/declarative_webrequest/webrequest_condition_attribute.cc
diff --git a/extensions/browser/api/declarative_webrequest/webrequest_condition_attribute.cc b/extensions/browser/api/declarative_webrequest/webrequest_condition_attribute.cc
index f9ef675231eca2b5e6af108023defa60d3abfbea..c9c51f17acddb912b6d4ec39b81257c5648569b8 100644
--- a/extensions/browser/api/declarative_webrequest/webrequest_condition_attribute.cc
+++ b/extensions/browser/api/declarative_webrequest/webrequest_condition_attribute.cc
@@ -157,14 +157,12 @@ WebRequestConditionAttributeResourceType::Create(
passed_types.reserve(number_types);
for (size_t i = 0; i < number_types; ++i) {
std::string resource_type_string;
- ResourceType type = content::RESOURCE_TYPE_LAST_TYPE;
if (!value_as_list->GetString(i, &resource_type_string) ||
- !helpers::ParseResourceType(resource_type_string, &type)) {
+ !helpers::ParseResourceType(resource_type_string, &passed_types)) {
*error = ErrorUtils::FormatErrorMessage(kInvalidValue,
keys::kResourceTypeKey);
return scoped_refptr<const WebRequestConditionAttribute>(NULL);
}
- passed_types.push_back(type);
}
return scoped_refptr<const WebRequestConditionAttribute>(
« no previous file with comments | « chrome/test/data/extensions/api_test/webrequest/test_types.js ('k') | extensions/browser/api/web_request/web_request_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698