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

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

Issue 1755273003: Simplify AuthenticationMethod type and PIN hash handling. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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
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 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <utility> 10 #include <utility>
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 xmpp_config_.auth_token = auth_token; 74 xmpp_config_.auth_token = auth_token;
75 75
76 // Initialize |authenticator_|. 76 // Initialize |authenticator_|.
77 scoped_ptr<protocol::ThirdPartyClientAuthenticator::TokenFetcher> 77 scoped_ptr<protocol::ThirdPartyClientAuthenticator::TokenFetcher>
78 token_fetcher(new TokenFetcherProxy( 78 token_fetcher(new TokenFetcherProxy(
79 base::Bind(&ChromotingJniInstance::FetchThirdPartyToken, 79 base::Bind(&ChromotingJniInstance::FetchThirdPartyToken,
80 weak_factory_.GetWeakPtr()), 80 weak_factory_.GetWeakPtr()),
81 host_pubkey)); 81 host_pubkey));
82 82
83 std::vector<protocol::AuthenticationMethod> auth_methods; 83 std::vector<protocol::AuthenticationMethod> auth_methods;
84 auth_methods.push_back(protocol::AuthenticationMethod::Spake2Pair()); 84 auth_methods.push_back(protocol::AuthenticationMethod::THIRD_PARTY);
85 auth_methods.push_back(protocol::AuthenticationMethod::Spake2( 85 auth_methods.push_back(protocol::AuthenticationMethod::SPAKE2_PAIR);
86 protocol::AuthenticationMethod::HMAC_SHA256)); 86 auth_methods.push_back(
87 auth_methods.push_back(protocol::AuthenticationMethod::Spake2( 87 protocol::AuthenticationMethod::SPAKE2_SHARED_SECRET_HMAC);
88 protocol::AuthenticationMethod::NONE)); 88 auth_methods.push_back(
89 auth_methods.push_back(protocol::AuthenticationMethod::ThirdParty()); 89 protocol::AuthenticationMethod::SPAKE2_SHARED_SECRET_PLAIN);
90 90
91 authenticator_.reset(new protocol::NegotiatingClientAuthenticator( 91 authenticator_.reset(new protocol::NegotiatingClientAuthenticator(
92 pairing_id, pairing_secret, host_id_, 92 pairing_id, pairing_secret, host_id_,
93 base::Bind(&ChromotingJniInstance::FetchSecret, this), 93 base::Bind(&ChromotingJniInstance::FetchSecret, this),
94 std::move(token_fetcher), auth_methods)); 94 std::move(token_fetcher), auth_methods));
95 95
96 // Post a task to start connection 96 // Post a task to start connection
97 jni_runtime_->network_task_runner()->PostTask( 97 jni_runtime_->network_task_runner()->PostTask(
98 FROM_HERE, 98 FROM_HERE,
99 base::Bind(&ChromotingJniInstance::ConnectToHostOnNetworkThread, this)); 99 base::Bind(&ChromotingJniInstance::ConnectToHostOnNetworkThread, this));
(...skipping 418 matching lines...) Expand 10 before | Expand all | Expand 10 after
518 perf_tracker_->round_trip_ms()); 518 perf_tracker_->round_trip_ms());
519 519
520 client_status_logger_->LogStatistics(perf_tracker_.get()); 520 client_status_logger_->LogStatistics(perf_tracker_.get());
521 521
522 jni_runtime_->network_task_runner()->PostDelayedTask( 522 jni_runtime_->network_task_runner()->PostDelayedTask(
523 FROM_HERE, base::Bind(&ChromotingJniInstance::LogPerfStats, this), 523 FROM_HERE, base::Bind(&ChromotingJniInstance::LogPerfStats, this),
524 base::TimeDelta::FromMilliseconds(kPerfStatsIntervalMs)); 524 base::TimeDelta::FromMilliseconds(kPerfStatsIntervalMs));
525 } 525 }
526 526
527 } // namespace remoting 527 } // namespace remoting
OLDNEW
« no previous file with comments | « no previous file | remoting/client/plugin/chromoting_instance.cc » ('j') | remoting/protocol/negotiating_client_authenticator.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698