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

Unified Diff: extensions/browser/api/cast_channel/cast_channel_api.cc

Issue 2252373002: 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 | « no previous file | extensions/browser/api/extensions_api_client.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/browser/api/cast_channel/cast_channel_api.cc
diff --git a/extensions/browser/api/cast_channel/cast_channel_api.cc b/extensions/browser/api/cast_channel/cast_channel_api.cc
index 15e44f1929d11b08516ce48f6ab3a273477f3cf2..cc16c39b29956d3f6314aebe906a220a6833339f 100644
--- a/extensions/browser/api/cast_channel/cast_channel_api.cc
+++ b/extensions/browser/api/cast_channel/cast_channel_api.cc
@@ -324,9 +324,9 @@ void CastChannelOpenFunction::AsyncWorkStart() {
// Construct read delegates.
std::unique_ptr<api::cast_channel::CastTransport::Delegate> delegate(
- base::WrapUnique(new CastMessageHandler(
+ base::MakeUnique<CastMessageHandler>(
base::Bind(&CastChannelAPI::SendEvent, api_->AsWeakPtr()), socket,
- api_->GetLogger())));
+ api_->GetLogger()));
if (socket->keep_alive()) {
// Wrap read delegate in a KeepAliveDelegate for timeout handling.
api::cast_channel::KeepAliveDelegate* keep_alive =
@@ -336,9 +336,8 @@ void CastChannelOpenFunction::AsyncWorkStart() {
std::unique_ptr<base::Timer> injected_timer =
api_->GetInjectedTimeoutTimerForTest();
if (injected_timer) {
- keep_alive->SetTimersForTest(
- base::WrapUnique(new base::Timer(false, false)),
- std::move(injected_timer));
+ keep_alive->SetTimersForTest(base::MakeUnique<base::Timer>(false, false),
+ std::move(injected_timer));
}
delegate.reset(keep_alive);
}
« no previous file with comments | « no previous file | extensions/browser/api/extensions_api_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698