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

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

Issue 19796006: Support service accounts in the chromoting host. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Update python api keys help script Created 7 years, 4 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 22 matching lines...) Expand all
33 public base::NonThreadSafe, 33 public base::NonThreadSafe,
34 public SignalStrategy::Listener, 34 public SignalStrategy::Listener,
35 public net::NetworkChangeNotifier::ConnectionTypeObserver, 35 public net::NetworkChangeNotifier::ConnectionTypeObserver,
36 public net::NetworkChangeNotifier::IPAddressObserver, 36 public net::NetworkChangeNotifier::IPAddressObserver,
37 public gaia::GaiaOAuthClient::Delegate { 37 public gaia::GaiaOAuthClient::Delegate {
38 public: 38 public:
39 // This structure contains information required to perform 39 // This structure contains information required to perform
40 // authentication to OAuth2. 40 // authentication to OAuth2.
41 struct OAuthCredentials { 41 struct OAuthCredentials {
42 OAuthCredentials(const std::string& login_value, 42 OAuthCredentials(const std::string& login_value,
43 const std::string& refresh_token_value); 43 const std::string& refresh_token_value,
44 bool is_service_account);
44 45
45 // The user's account name (i.e. their email address). 46 // The user's account name (i.e. their email address).
46 std::string login; 47 std::string login;
47 48
48 // Token delegating authority to us to act as the user. 49 // Token delegating authority to us to act as the user.
49 std::string refresh_token; 50 std::string refresh_token;
51
52 // Whether these credentials belong to a service account.
53 bool is_service_account;
50 }; 54 };
51 55
52 // The |auth_failed_callback| is called when authentication fails. 56 // The |auth_failed_callback| is called when authentication fails.
53 SignalingConnector( 57 SignalingConnector(
54 XmppSignalStrategy* signal_strategy, 58 XmppSignalStrategy* signal_strategy,
55 scoped_refptr<net::URLRequestContextGetter> url_request_context_getter, 59 scoped_refptr<net::URLRequestContextGetter> url_request_context_getter,
56 scoped_ptr<DnsBlackholeChecker> dns_blackhole_checker, 60 scoped_ptr<DnsBlackholeChecker> dns_blackhole_checker,
57 const base::Closure& auth_failed_callback); 61 const base::Closure& auth_failed_callback);
58 virtual ~SignalingConnector(); 62 virtual ~SignalingConnector();
59 63
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 base::Time auth_token_expiry_time_; 112 base::Time auth_token_expiry_time_;
109 113
110 base::OneShotTimer<SignalingConnector> timer_; 114 base::OneShotTimer<SignalingConnector> timer_;
111 115
112 DISALLOW_COPY_AND_ASSIGN(SignalingConnector); 116 DISALLOW_COPY_AND_ASSIGN(SignalingConnector);
113 }; 117 };
114 118
115 } // namespace remoting 119 } // namespace remoting
116 120
117 #endif // REMOTING_HOST_SIGNALING_CONNECTOR_H_ 121 #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