Index: components/url_matcher/url_matcher_unittest.cc |
diff --git a/components/url_matcher/url_matcher_unittest.cc b/components/url_matcher/url_matcher_unittest.cc |
index a027a4213ff0fda3ea38d3c3a30409f3d186aaaf..3fa9377e8305c25a4ad21af21cd1b8bbf4db7b7c 100644 |
--- a/components/url_matcher/url_matcher_unittest.cc |
+++ b/components/url_matcher/url_matcher_unittest.cc |
@@ -5,6 +5,8 @@ |
#include "components/url_matcher/url_matcher.h" |
#include <stddef.h> |
+ |
+#include <memory> |
#include <utility> |
#include "base/macros.h" |
@@ -480,27 +482,26 @@ TEST(URLMatcherConditionSetTest, Matching) { |
// Test scheme filters. |
scoped_refptr<URLMatcherConditionSet> condition_set2( |
- new URLMatcherConditionSet(1, |
- conditions, |
- scoped_ptr<URLMatcherSchemeFilter>( |
+ new URLMatcherConditionSet(1, conditions, |
+ std::unique_ptr<URLMatcherSchemeFilter>( |
new URLMatcherSchemeFilter("https")), |
- scoped_ptr<URLMatcherPortFilter>())); |
+ std::unique_ptr<URLMatcherPortFilter>())); |
EXPECT_FALSE(condition_set2->IsMatch(matching_patterns, url1)); |
scoped_refptr<URLMatcherConditionSet> condition_set3( |
- new URLMatcherConditionSet(1, |
- conditions, |
- scoped_ptr<URLMatcherSchemeFilter>( |
+ new URLMatcherConditionSet(1, conditions, |
+ std::unique_ptr<URLMatcherSchemeFilter>( |
new URLMatcherSchemeFilter("http")), |
- scoped_ptr<URLMatcherPortFilter>())); |
+ std::unique_ptr<URLMatcherPortFilter>())); |
EXPECT_TRUE(condition_set3->IsMatch(matching_patterns, url1)); |
// Test port filters. |
std::vector<URLMatcherPortFilter::Range> ranges; |
ranges.push_back(URLMatcherPortFilter::CreateRange(80)); |
- scoped_ptr<URLMatcherPortFilter> filter(new URLMatcherPortFilter(ranges)); |
+ std::unique_ptr<URLMatcherPortFilter> filter( |
+ new URLMatcherPortFilter(ranges)); |
scoped_refptr<URLMatcherConditionSet> condition_set4( |
new URLMatcherConditionSet(1, conditions, |
- scoped_ptr<URLMatcherSchemeFilter>(), |
+ std::unique_ptr<URLMatcherSchemeFilter>(), |
std::move(filter))); |
EXPECT_TRUE(condition_set4->IsMatch(matching_patterns, url1)); |
EXPECT_TRUE(condition_set4->IsMatch(matching_patterns, url3)); |
@@ -561,8 +562,8 @@ bool IsQueryMatch( |
URLMatcherConditionSet::QueryConditions query_conditions; |
query_conditions.insert(q1); |
- scoped_ptr<URLMatcherSchemeFilter> scheme_filter; |
- scoped_ptr<URLMatcherPortFilter> port_filter; |
+ std::unique_ptr<URLMatcherSchemeFilter> scheme_filter; |
+ std::unique_ptr<URLMatcherPortFilter> port_filter; |
scoped_refptr<URLMatcherConditionSet> condition_set( |
new URLMatcherConditionSet(1, conditions, query_conditions, |