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

Side by Side Diff: remoting/client/jni/chromoting_jni_instance.cc

Issue 395003002: Enable Third Party Auth for Android (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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 | « no previous file | 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 #include "remoting/client/jni/chromoting_jni_instance.h" 5 #include "remoting/client/jni/chromoting_jni_instance.h"
6 6
7 #include <android/log.h> 7 #include <android/log.h>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 base::Bind(&ChromotingJniInstance::FetchThirdPartyToken, 69 base::Bind(&ChromotingJniInstance::FetchThirdPartyToken,
70 weak_factory_.GetWeakPtr()), 70 weak_factory_.GetWeakPtr()),
71 host_pubkey)); 71 host_pubkey));
72 72
73 std::vector<protocol::AuthenticationMethod> auth_methods; 73 std::vector<protocol::AuthenticationMethod> auth_methods;
74 auth_methods.push_back(protocol::AuthenticationMethod::Spake2Pair()); 74 auth_methods.push_back(protocol::AuthenticationMethod::Spake2Pair());
75 auth_methods.push_back(protocol::AuthenticationMethod::Spake2( 75 auth_methods.push_back(protocol::AuthenticationMethod::Spake2(
76 protocol::AuthenticationMethod::HMAC_SHA256)); 76 protocol::AuthenticationMethod::HMAC_SHA256));
77 auth_methods.push_back(protocol::AuthenticationMethod::Spake2( 77 auth_methods.push_back(protocol::AuthenticationMethod::Spake2(
78 protocol::AuthenticationMethod::NONE)); 78 protocol::AuthenticationMethod::NONE));
79 auth_methods.push_back(protocol::AuthenticationMethod::ThirdParty());
79 80
80 authenticator_.reset(new protocol::NegotiatingClientAuthenticator( 81 authenticator_.reset(new protocol::NegotiatingClientAuthenticator(
81 pairing_id, pairing_secret, host_id_, 82 pairing_id, pairing_secret, host_id_,
82 base::Bind(&ChromotingJniInstance::FetchSecret, this), 83 base::Bind(&ChromotingJniInstance::FetchSecret, this),
83 token_fetcher.Pass(), auth_methods)); 84 token_fetcher.Pass(), auth_methods));
84 85
85 // Post a task to start connection 86 // Post a task to start connection
86 jni_runtime_->display_task_runner()->PostTask( 87 jni_runtime_->display_task_runner()->PostTask(
87 FROM_HERE, 88 FROM_HERE,
88 base::Bind(&ChromotingJniInstance::ConnectToHostOnDisplayThread, 89 base::Bind(&ChromotingJniInstance::ConnectToHostOnDisplayThread,
(...skipping 390 matching lines...) Expand 10 before | Expand all | Expand 10 after
479 stats->round_trip_ms()->Average()); 480 stats->round_trip_ms()->Average());
480 481
481 client_status_logger_->LogStatistics(stats); 482 client_status_logger_->LogStatistics(stats);
482 483
483 jni_runtime_->network_task_runner()->PostDelayedTask( 484 jni_runtime_->network_task_runner()->PostDelayedTask(
484 FROM_HERE, base::Bind(&ChromotingJniInstance::LogPerfStats, this), 485 FROM_HERE, base::Bind(&ChromotingJniInstance::LogPerfStats, this),
485 base::TimeDelta::FromMilliseconds(kPerfStatsIntervalMs)); 486 base::TimeDelta::FromMilliseconds(kPerfStatsIntervalMs));
486 } 487 }
487 488
488 } // namespace remoting 489 } // namespace remoting
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698