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

Side by Side Diff: remoting/host/remoting_me2me_host.cc

Issue 294813002: Add auto-refresh support to OAuthTokenGetter (disabled for now). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Review comments. Created 6 years, 7 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/oauth_token_getter.cc ('k') | no next file » | 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 // This file implements a standalone host process for Me2Me. 5 // This file implements a standalone host process for Me2Me.
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/at_exit.h" 9 #include "base/at_exit.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 1126 matching lines...) Expand 10 before | Expand all | Expand 10 after
1137 base::Bind(&HostProcess::OnAuthFailed, this))); 1137 base::Bind(&HostProcess::OnAuthFailed, this)));
1138 1138
1139 if (!oauth_refresh_token_.empty()) { 1139 if (!oauth_refresh_token_.empty()) {
1140 scoped_ptr<OAuthTokenGetter::OAuthCredentials> oauth_credentials; 1140 scoped_ptr<OAuthTokenGetter::OAuthCredentials> oauth_credentials;
1141 oauth_credentials.reset( 1141 oauth_credentials.reset(
1142 new OAuthTokenGetter::OAuthCredentials( 1142 new OAuthTokenGetter::OAuthCredentials(
1143 xmpp_server_config_.username, oauth_refresh_token_, 1143 xmpp_server_config_.username, oauth_refresh_token_,
1144 use_service_account_)); 1144 use_service_account_));
1145 1145
1146 oauth_token_getter_.reset(new OAuthTokenGetter( 1146 oauth_token_getter_.reset(new OAuthTokenGetter(
1147 oauth_credentials.Pass(), context_->url_request_context_getter())); 1147 oauth_credentials.Pass(), context_->url_request_context_getter(),
1148 false));
1148 1149
1149 signaling_connector_->EnableOAuth(oauth_token_getter_.get()); 1150 signaling_connector_->EnableOAuth(oauth_token_getter_.get());
1150 } 1151 }
1151 1152
1152 uint32 network_flags = allow_nat_traversal_ ? 1153 uint32 network_flags = allow_nat_traversal_ ?
1153 NetworkSettings::NAT_TRAVERSAL_STUN : 0; 1154 NetworkSettings::NAT_TRAVERSAL_STUN : 0;
1154 1155
1155 if (allow_relay_) 1156 if (allow_relay_)
1156 network_flags |= NetworkSettings::NAT_TRAVERSAL_RELAY; 1157 network_flags |= NetworkSettings::NAT_TRAVERSAL_RELAY;
1157 1158
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
1353 return exit_code; 1354 return exit_code;
1354 } 1355 }
1355 1356
1356 } // namespace remoting 1357 } // namespace remoting
1357 1358
1358 #if !defined(OS_WIN) 1359 #if !defined(OS_WIN)
1359 int main(int argc, char** argv) { 1360 int main(int argc, char** argv) {
1360 return remoting::HostMain(argc, argv); 1361 return remoting::HostMain(argc, argv);
1361 } 1362 }
1362 #endif // !defined(OS_WIN) 1363 #endif // !defined(OS_WIN)
OLDNEW
« no previous file with comments | « remoting/host/oauth_token_getter.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698