OLD | NEW |
---|---|
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 #ifndef REMOTING_HOST_SIGNALING_CONNECTOR_H | 5 #ifndef REMOTING_HOST_SIGNALING_CONNECTOR_H |
6 #define REMOTING_HOST_SIGNALING_CONNECTOR_H | 6 #define REMOTING_HOST_SIGNALING_CONNECTOR_H |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/memory/weak_ptr.h" | 9 #include "base/memory/weak_ptr.h" |
10 #include "base/threading/non_thread_safe.h" | 10 #include "base/threading/non_thread_safe.h" |
(...skipping 15 matching lines...) Expand all Loading... | |
26 class SignalingConnector | 26 class SignalingConnector |
27 : public base::SupportsWeakPtr<SignalingConnector>, | 27 : public base::SupportsWeakPtr<SignalingConnector>, |
28 public base::NonThreadSafe, | 28 public base::NonThreadSafe, |
29 public SignalStrategy::Listener, | 29 public SignalStrategy::Listener, |
30 public net::NetworkChangeNotifier::OnlineStateObserver, | 30 public net::NetworkChangeNotifier::OnlineStateObserver, |
31 public net::NetworkChangeNotifier::IPAddressObserver, | 31 public net::NetworkChangeNotifier::IPAddressObserver, |
32 public GaiaOAuthClient::Delegate { | 32 public GaiaOAuthClient::Delegate { |
33 public: | 33 public: |
34 struct OAuthCredentials { | 34 struct OAuthCredentials { |
35 OAuthCredentials(const std::string& login_value, | 35 OAuthCredentials(const std::string& login_value, |
36 const std::string& refresh_token_value); | 36 const std::string& refresh_token_value, |
37 const OAuthClientInfo& client_info); | |
37 std::string login; | 38 std::string login; |
38 std::string refresh_token; | 39 std::string refresh_token; |
40 OAuthClientInfo client_info; | |
Wez
2012/04/19 00:13:04
I realise it's not your fault this structure has n
Alpha Left Google
2012/04/20 22:13:50
I'll add comments, please see if they match. *I th
| |
39 }; | 41 }; |
40 | 42 |
41 // OAuth token is updated refreshed when |oauth_credentials| is | 43 // OAuth token is updated refreshed when |oauth_credentials| is |
42 // not NULL. | 44 // not NULL. |
43 SignalingConnector(XmppSignalStrategy* signal_strategy); | 45 SignalingConnector(XmppSignalStrategy* signal_strategy); |
44 virtual ~SignalingConnector(); | 46 virtual ~SignalingConnector(); |
45 | 47 |
46 void EnableOAuth(scoped_ptr<OAuthCredentials> oauth_credentials, | 48 void EnableOAuth(scoped_ptr<OAuthCredentials> oauth_credentials, |
47 const base::Closure& oauth_failed_callback, | 49 const base::Closure& oauth_failed_callback, |
48 URLRequestContextGetter* url_context); | 50 URLRequestContextGetter* url_context); |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
86 base::Time auth_token_expiry_time_; | 88 base::Time auth_token_expiry_time_; |
87 | 89 |
88 base::OneShotTimer<SignalingConnector> timer_; | 90 base::OneShotTimer<SignalingConnector> timer_; |
89 | 91 |
90 DISALLOW_COPY_AND_ASSIGN(SignalingConnector); | 92 DISALLOW_COPY_AND_ASSIGN(SignalingConnector); |
91 }; | 93 }; |
92 | 94 |
93 } // namespace remoting | 95 } // namespace remoting |
94 | 96 |
95 #endif // REMOTING_HOST_SIGNALING_CONNECTOR_H | 97 #endif // REMOTING_HOST_SIGNALING_CONNECTOR_H |
OLD | NEW |