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

Unified Diff: components/policy/core/browser/url_blacklist_manager.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/policy/core/browser/url_blacklist_manager.cc
diff --git a/components/policy/core/browser/url_blacklist_manager.cc b/components/policy/core/browser/url_blacklist_manager.cc
index ae7b07160e55a17fd2e1a0b8882b69a4bddc6656..ffc8dacb602d8646f41a87fda11a62db2fe038d9 100644
--- a/components/policy/core/browser/url_blacklist_manager.cc
+++ b/components/policy/core/browser/url_blacklist_manager.cc
@@ -5,8 +5,8 @@
#include "components/policy/core/browser/url_blacklist_manager.h"
#include <stdint.h>
-
#include <limits>
+#include <utility>
#include "base/bind.h"
#include "base/files/file_path.h"
@@ -67,7 +67,7 @@ scoped_ptr<URLBlacklist> BuildBlacklist(
scoped_ptr<URLBlacklist> blacklist(new URLBlacklist(segment_url));
blacklist->Block(block.get());
blacklist->Allow(allow.get());
- return blacklist.Pass();
+ return blacklist;
}
// Tokenise the parameter |query| and add appropriate query element matcher
@@ -361,11 +361,9 @@ scoped_refptr<URLMatcherConditionSet> URLBlacklist::CreateConditionSet(
port_filter.reset(new URLMatcherPortFilter(ranges));
}
- return new URLMatcherConditionSet(id,
- conditions,
- query_conditions,
- scheme_filter.Pass(),
- port_filter.Pass());
+ return new URLMatcherConditionSet(id, conditions, query_conditions,
+ std::move(scheme_filter),
+ std::move(port_filter));
}
// static
@@ -485,7 +483,7 @@ void URLBlacklistManager::UpdateOnIO(scoped_ptr<base::ListValue> block,
void URLBlacklistManager::SetBlacklist(scoped_ptr<URLBlacklist> blacklist) {
DCHECK(io_task_runner_->RunsTasksOnCurrentThread());
- blacklist_ = blacklist.Pass();
+ blacklist_ = std::move(blacklist);
}
bool URLBlacklistManager::IsURLBlocked(const GURL& url) const {

Powered by Google App Engine
This is Rietveld 408576698