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

Side by Side Diff: remoting/host/signaling_connector.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 unified diff | Download patch
« no previous file with comments | « remoting/host/signaling_connector.h ('k') | remoting/host/single_window_desktop_environment.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "remoting/host/signaling_connector.h" 5 #include "remoting/host/signaling_connector.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 24 matching lines...) Expand all
35 return "PROTOCOL_ERROR"; 35 return "PROTOCOL_ERROR";
36 } 36 }
37 NOTREACHED(); 37 NOTREACHED();
38 return ""; 38 return "";
39 } 39 }
40 40
41 } // namespace 41 } // namespace
42 42
43 SignalingConnector::SignalingConnector( 43 SignalingConnector::SignalingConnector(
44 XmppSignalStrategy* signal_strategy, 44 XmppSignalStrategy* signal_strategy,
45 scoped_ptr<DnsBlackholeChecker> dns_blackhole_checker, 45 std::unique_ptr<DnsBlackholeChecker> dns_blackhole_checker,
46 OAuthTokenGetter* oauth_token_getter, 46 OAuthTokenGetter* oauth_token_getter,
47 const base::Closure& auth_failed_callback) 47 const base::Closure& auth_failed_callback)
48 : signal_strategy_(signal_strategy), 48 : signal_strategy_(signal_strategy),
49 auth_failed_callback_(auth_failed_callback), 49 auth_failed_callback_(auth_failed_callback),
50 dns_blackhole_checker_(std::move(dns_blackhole_checker)), 50 dns_blackhole_checker_(std::move(dns_blackhole_checker)),
51 oauth_token_getter_(oauth_token_getter), 51 oauth_token_getter_(oauth_token_getter),
52 reconnect_attempts_(0) { 52 reconnect_attempts_(0) {
53 DCHECK(!auth_failed_callback_.is_null()); 53 DCHECK(!auth_failed_callback_.is_null());
54 DCHECK(dns_blackhole_checker_.get()); 54 DCHECK(dns_blackhole_checker_.get());
55 net::NetworkChangeNotifier::AddConnectionTypeObserver(this); 55 net::NetworkChangeNotifier::AddConnectionTypeObserver(this);
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 } 181 }
182 182
183 if (signal_strategy_->GetState() == SignalStrategy::DISCONNECTED) { 183 if (signal_strategy_->GetState() == SignalStrategy::DISCONNECTED) {
184 HOST_LOG << "Attempting to connect signaling."; 184 HOST_LOG << "Attempting to connect signaling.";
185 oauth_token_getter_->CallWithToken( 185 oauth_token_getter_->CallWithToken(
186 base::Bind(&SignalingConnector::OnAccessToken, AsWeakPtr())); 186 base::Bind(&SignalingConnector::OnAccessToken, AsWeakPtr()));
187 } 187 }
188 } 188 }
189 189
190 } // namespace remoting 190 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/host/signaling_connector.h ('k') | remoting/host/single_window_desktop_environment.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698