| OLD | NEW |
| 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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 capabilities_(capabilities), | 56 capabilities_(capabilities), |
| 57 weak_factory_(this) { | 57 weak_factory_(this) { |
| 58 DCHECK(jni_runtime_->ui_task_runner()->BelongsToCurrentThread()); | 58 DCHECK(jni_runtime_->ui_task_runner()->BelongsToCurrentThread()); |
| 59 | 59 |
| 60 // Intialize XMPP config. | 60 // Intialize XMPP config. |
| 61 xmpp_config_.host = kXmppServer; | 61 xmpp_config_.host = kXmppServer; |
| 62 xmpp_config_.port = kXmppPort; | 62 xmpp_config_.port = kXmppPort; |
| 63 xmpp_config_.use_tls = kXmppUseTls; | 63 xmpp_config_.use_tls = kXmppUseTls; |
| 64 xmpp_config_.username = username; | 64 xmpp_config_.username = username; |
| 65 xmpp_config_.auth_token = auth_token; | 65 xmpp_config_.auth_token = auth_token; |
| 66 xmpp_config_.auth_service = "oauth2"; | |
| 67 | 66 |
| 68 // Initialize |authenticator_|. | 67 // Initialize |authenticator_|. |
| 69 scoped_ptr<protocol::ThirdPartyClientAuthenticator::TokenFetcher> | 68 scoped_ptr<protocol::ThirdPartyClientAuthenticator::TokenFetcher> |
| 70 token_fetcher(new TokenFetcherProxy( | 69 token_fetcher(new TokenFetcherProxy( |
| 71 base::Bind(&ChromotingJniInstance::FetchThirdPartyToken, | 70 base::Bind(&ChromotingJniInstance::FetchThirdPartyToken, |
| 72 weak_factory_.GetWeakPtr()), | 71 weak_factory_.GetWeakPtr()), |
| 73 host_pubkey)); | 72 host_pubkey)); |
| 74 | 73 |
| 75 std::vector<protocol::AuthenticationMethod> auth_methods; | 74 std::vector<protocol::AuthenticationMethod> auth_methods; |
| 76 auth_methods.push_back(protocol::AuthenticationMethod::Spake2Pair()); | 75 auth_methods.push_back(protocol::AuthenticationMethod::Spake2Pair()); |
| (...skipping 454 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 531 stats->round_trip_ms()->Average()); | 530 stats->round_trip_ms()->Average()); |
| 532 | 531 |
| 533 client_status_logger_->LogStatistics(stats); | 532 client_status_logger_->LogStatistics(stats); |
| 534 | 533 |
| 535 jni_runtime_->network_task_runner()->PostDelayedTask( | 534 jni_runtime_->network_task_runner()->PostDelayedTask( |
| 536 FROM_HERE, base::Bind(&ChromotingJniInstance::LogPerfStats, this), | 535 FROM_HERE, base::Bind(&ChromotingJniInstance::LogPerfStats, this), |
| 537 base::TimeDelta::FromMilliseconds(kPerfStatsIntervalMs)); | 536 base::TimeDelta::FromMilliseconds(kPerfStatsIntervalMs)); |
| 538 } | 537 } |
| 539 | 538 |
| 540 } // namespace remoting | 539 } // namespace remoting |
| OLD | NEW |