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

Unified Diff: remoting/protocol/transport_context.cc

Issue 1864213002: Convert //remoting to use std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Mac IWYU Created 4 years, 8 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 | « remoting/protocol/transport_context.h ('k') | remoting/protocol/v2_authenticator.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/protocol/transport_context.cc
diff --git a/remoting/protocol/transport_context.cc b/remoting/protocol/transport_context.cc
index c10953f4f0aff3ffce82ed7d482a0a746503659f..14a2d56909e0fbc9d3b7ad857b31a75a548b0306 100644
--- a/remoting/protocol/transport_context.cc
+++ b/remoting/protocol/transport_context.cc
@@ -8,6 +8,7 @@
#include "base/bind.h"
#include "base/location.h"
+#include "base/memory/ptr_util.h"
#include "base/single_thread_task_runner.h"
#include "base/thread_task_runner_handle.h"
#include "remoting/base/url_request.h"
@@ -30,7 +31,7 @@ namespace protocol {
scoped_refptr<TransportContext> TransportContext::ForTests(TransportRole role) {
jingle_glue::JingleThreadWrapper::EnsureForCurrentMessageLoop();
return new protocol::TransportContext(
- nullptr, make_scoped_ptr(new protocol::ChromiumPortAllocatorFactory()),
+ nullptr, base::WrapUnique(new protocol::ChromiumPortAllocatorFactory()),
nullptr, protocol::NetworkSettings(
protocol::NetworkSettings::NAT_TRAVERSAL_OUTGOING),
role);
@@ -39,8 +40,8 @@ scoped_refptr<TransportContext> TransportContext::ForTests(TransportRole role) {
TransportContext::TransportContext(
SignalStrategy* signal_strategy,
- scoped_ptr<PortAllocatorFactory> port_allocator_factory,
- scoped_ptr<UrlRequestFactory> url_request_factory,
+ std::unique_ptr<PortAllocatorFactory> port_allocator_factory,
+ std::unique_ptr<UrlRequestFactory> url_request_factory,
const NetworkSettings& network_settings,
TransportRole role)
: signal_strategy_(signal_strategy),
@@ -80,7 +81,7 @@ void TransportContext::EnsureFreshIceConfig() {
if (ice_config_[relay_mode_].is_null() ||
base::Time::Now() > ice_config_[relay_mode_].expiration_time) {
- scoped_ptr<IceConfigRequest> request;
+ std::unique_ptr<IceConfigRequest> request;
switch (relay_mode_) {
case RelayMode::TURN:
if (ice_config_url_.empty()) {
« no previous file with comments | « remoting/protocol/transport_context.h ('k') | remoting/protocol/v2_authenticator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698