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

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 compile error 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
« no previous file with comments | « remoting/host/remoting_me2me_host.cc ('k') | remoting/host/signaling_connector.cc » ('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 #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 // The user's account name (i.e. their email address).
37 std::string login; 42 std::string login;
43
44 // Token delegating authority to us to act as the user.
38 std::string refresh_token; 45 std::string refresh_token;
46
47 // Credentials identifying the application to OAuth.
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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 base::Time auth_token_expiry_time_; 93 base::Time auth_token_expiry_time_;
84 94
85 base::OneShotTimer<SignalingConnector> timer_; 95 base::OneShotTimer<SignalingConnector> timer_;
86 96
87 DISALLOW_COPY_AND_ASSIGN(SignalingConnector); 97 DISALLOW_COPY_AND_ASSIGN(SignalingConnector);
88 }; 98 };
89 99
90 } // namespace remoting 100 } // namespace remoting
91 101
92 #endif // REMOTING_HOST_SIGNALING_CONNECTOR_H 102 #endif // REMOTING_HOST_SIGNALING_CONNECTOR_H
OLDNEW
« no previous file with comments | « remoting/host/remoting_me2me_host.cc ('k') | remoting/host/signaling_connector.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698