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

Unified Diff: components/url_matcher/url_matcher_unittest.cc

Issue 1917673002: Convert //components/[u-z]* from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
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
« no previous file with comments | « components/url_matcher/url_matcher_factory.cc ('k') | components/user_manager/fake_user_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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,
« no previous file with comments | « components/url_matcher/url_matcher_factory.cc ('k') | components/user_manager/fake_user_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698