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

Side by Side Diff: remoting/host/signaling_connector.h

Issue 10116040: Remoting daemon process to support unofficial client ID (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixed comments Created 8 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 | Annotate | Revision Log
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 #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 13 matching lines...) Expand all
24 // backoff. It also monitors network state and reconnects signalling 24 // backoff. It also monitors network state and reconnects signalling
25 // whenever online state changes or IP address changes. 25 // whenever online state changes or IP address changes.
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 // This structure contains information required to perform
35 // authentication to OAuth2.
34 struct OAuthCredentials { 36 struct OAuthCredentials {
35 OAuthCredentials(const std::string& login_value, 37 OAuthCredentials(const std::string& login_value,
36 const std::string& refresh_token_value); 38 const std::string& refresh_token_value,
39 const OAuthClientInfo& client_info);
40
41 // ID to identify the user.
Wez 2012/04/20 22:29:46 nit: Suggest "The user's account name (i.e. their
37 std::string login; 42 std::string login;
43
44 // Secret to authenticate the user.
38 std::string refresh_token; 45 std::string refresh_token;
Wez 2012/04/20 22:29:46 nit: Suggest "Token delegating authority to us to
46
47 // ID and secret to identify the client.
Wez 2012/04/20 22:29:46 nit: Suggest "Credentials identifying the applicat
48 OAuthClientInfo client_info;
39 }; 49 };
40 50
41 // OAuth token is updated refreshed when |oauth_credentials| is 51 // OAuth token is updated refreshed when |oauth_credentials| is
42 // not NULL. 52 // not NULL.
43 SignalingConnector(XmppSignalStrategy* signal_strategy); 53 SignalingConnector(XmppSignalStrategy* signal_strategy);
44 virtual ~SignalingConnector(); 54 virtual ~SignalingConnector();
45 55
46 void EnableOAuth(scoped_ptr<OAuthCredentials> oauth_credentials, 56 void EnableOAuth(scoped_ptr<OAuthCredentials> oauth_credentials,
47 const base::Closure& oauth_failed_callback, 57 const base::Closure& oauth_failed_callback,
48 URLRequestContextGetter* url_context); 58 URLRequestContextGetter* url_context);
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 base::Time auth_token_expiry_time_; 96 base::Time auth_token_expiry_time_;
87 97
88 base::OneShotTimer<SignalingConnector> timer_; 98 base::OneShotTimer<SignalingConnector> timer_;
89 99
90 DISALLOW_COPY_AND_ASSIGN(SignalingConnector); 100 DISALLOW_COPY_AND_ASSIGN(SignalingConnector);
91 }; 101 };
92 102
93 } // namespace remoting 103 } // namespace remoting
94 104
95 #endif // REMOTING_HOST_SIGNALING_CONNECTOR_H 105 #endif // REMOTING_HOST_SIGNALING_CONNECTOR_H
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698