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

Unified Diff: components/url_matcher/url_matcher_unittest.cc

Issue 1548203002: Convert Pass()→std::move() in //components/[n-z]* (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix bad headers Created 5 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
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 7219d60f43f1c8bf6fd0288becf8983ff01fc237..a027a4213ff0fda3ea38d3c3a30409f3d186aaaf 100644
--- a/components/url_matcher/url_matcher_unittest.cc
+++ b/components/url_matcher/url_matcher_unittest.cc
@@ -5,6 +5,7 @@
#include "components/url_matcher/url_matcher.h"
#include <stddef.h>
+#include <utility>
#include "base/macros.h"
#include "base/strings/string_util.h"
@@ -498,8 +499,9 @@ TEST(URLMatcherConditionSetTest, Matching) {
ranges.push_back(URLMatcherPortFilter::CreateRange(80));
scoped_ptr<URLMatcherPortFilter> filter(new URLMatcherPortFilter(ranges));
scoped_refptr<URLMatcherConditionSet> condition_set4(
- new URLMatcherConditionSet(
- 1, conditions, scoped_ptr<URLMatcherSchemeFilter>(), filter.Pass()));
+ new URLMatcherConditionSet(1, conditions,
+ scoped_ptr<URLMatcherSchemeFilter>(),
+ std::move(filter)));
EXPECT_TRUE(condition_set4->IsMatch(matching_patterns, url1));
EXPECT_TRUE(condition_set4->IsMatch(matching_patterns, url3));
EXPECT_FALSE(condition_set4->IsMatch(matching_patterns, url4));
@@ -563,11 +565,9 @@ bool IsQueryMatch(
scoped_ptr<URLMatcherPortFilter> port_filter;
scoped_refptr<URLMatcherConditionSet> condition_set(
- new URLMatcherConditionSet(1,
- conditions,
- query_conditions,
- scheme_filter.Pass(),
- port_filter.Pass()));
+ new URLMatcherConditionSet(1, conditions, query_conditions,
+ std::move(scheme_filter),
+ std::move(port_filter)));
GURL url("http://www.example.com/foo?" + url_query);
« no previous file with comments | « components/url_matcher/url_matcher_factory.cc ('k') | components/user_prefs/tracked/interceptable_pref_filter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698