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

Unified Diff: content/child/resource_dispatcher_unittest.cc

Issue 2254173002: Re-write many calls to WrapUnique() with MakeUnique() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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 | « content/child/resource_dispatcher.cc ('k') | content/child/service_worker/web_service_worker_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/child/resource_dispatcher_unittest.cc
diff --git a/content/child/resource_dispatcher_unittest.cc b/content/child/resource_dispatcher_unittest.cc
index 391f937dbc0956a56e94fc493c802986e70000d8..806fd26ad08801a78ba400f5a79b50f32ef77bce 100644
--- a/content/child/resource_dispatcher_unittest.cc
+++ b/content/child/resource_dispatcher_unittest.cc
@@ -519,7 +519,7 @@ class TestResourceDispatcherDelegate : public ResourceDispatcherDelegate {
std::unique_ptr<RequestPeer> current_peer,
const std::string& mime_type,
const GURL& url) override {
- return base::WrapUnique(new WrapperPeer(std::move(current_peer)));
+ return base::MakeUnique<WrapperPeer>(std::move(current_peer));
}
class WrapperPeer : public RequestPeer {
@@ -552,8 +552,8 @@ class TestResourceDispatcherDelegate : public ResourceDispatcherDelegate {
int64_t total_transfer_size) override {
original_peer_->OnReceivedResponse(response_info_);
if (!data_.empty()) {
- original_peer_->OnReceivedData(base::WrapUnique(new FixedReceivedData(
- data_.data(), data_.size(), -1, data_.size())));
+ original_peer_->OnReceivedData(base::MakeUnique<FixedReceivedData>(
+ data_.data(), data_.size(), -1, data_.size()));
}
original_peer_->OnCompletedRequest(error_code, was_ignored_by_handler,
stale_copy_in_cache, security_info,
« no previous file with comments | « content/child/resource_dispatcher.cc ('k') | content/child/service_worker/web_service_worker_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698