Commit d3f75319 authored by codeimpl's avatar codeimpl Committed by Commit Bot

std::make_unique should be preferred than base::WrapUnique in android

std::make_unique<Type>(...) and base::WrapUnique<new Type(...)) are
equivalent but std::make_unique should be preferred, because it is
harder to use unsafely than base::WrapUnique.

Ref:
 https://www.chromium.org/developers/coding-style/cpp-dos-and-donts#TOC-Prefer-MakeUnique-to-WrapUnique

Bug: None
Change-Id: I6b8c379a74856162ae2f1f1faa772554bfc4fbb4
Reviewed-on: https://chromium-review.googlesource.com/1034049Reviewed-by: default avatarTed Choc <tedchoc@chromium.org>
Commit-Queue: Ted Choc <tedchoc@chromium.org>
Cr-Commit-Position: refs/heads/master@{#557289}
parent ba76ad04
......@@ -4,7 +4,8 @@
#include "content/browser/android/content_protocol_handler_impl.h"
#include "base/memory/ptr_util.h"
#include <memory>
#include "base/task_runner.h"
#include "content/browser/android/url_request_content_job.h"
#include "net/base/net_errors.h"
......@@ -16,7 +17,7 @@ namespace content {
// static
std::unique_ptr<ContentProtocolHandler> ContentProtocolHandler::Create(
const scoped_refptr<base::TaskRunner>& content_task_runner) {
return base::WrapUnique(new ContentProtocolHandlerImpl(content_task_runner));
return std::make_unique<ContentProtocolHandlerImpl>(content_task_runner);
}
ContentProtocolHandlerImpl::ContentProtocolHandlerImpl(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment