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

Unified Diff: components/subresource_filter/core/common/indexed_ruleset_unittest.cc

Issue 2288023003: Cache is_third_party requests in a one-entry cache. (Closed)
Patch Set: Address more comments from engedy@ Created 4 years, 2 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
« no previous file with comments | « components/subresource_filter/core/common/indexed_ruleset.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/subresource_filter/core/common/indexed_ruleset_unittest.cc
diff --git a/components/subresource_filter/core/common/indexed_ruleset_unittest.cc b/components/subresource_filter/core/common/indexed_ruleset_unittest.cc
index 1cd4a6c8902a5574de4b614af081b8ae788504ce..b0e183e5d9f5f45c0043a195289c68fcbe378b2b 100644
--- a/components/subresource_filter/core/common/indexed_ruleset_unittest.cc
+++ b/components/subresource_filter/core/common/indexed_ruleset_unittest.cc
@@ -9,6 +9,7 @@
#include <vector>
#include "base/logging.h"
+#include "components/subresource_filter/core/common/first_party_origin.h"
#include "components/subresource_filter/core/common/proto/rules.pb.h"
#include "components/subresource_filter/core/common/url_pattern.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -44,7 +45,8 @@ class IndexedRulesetTest : public testing::Test {
proto::ElementType element_type = proto::ELEMENT_TYPE_OTHER) const {
DCHECK_NE(matcher_.get(), nullptr);
url::Origin origin = GetOrigin(initiator);
- return !matcher_->ShouldDisallowResourceLoad(GURL(url), origin,
+ FirstPartyOrigin first_party(origin);
+ return !matcher_->ShouldDisallowResourceLoad(GURL(url), first_party,
element_type);
}
« no previous file with comments | « components/subresource_filter/core/common/indexed_ruleset.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698