| Index: remoting/client/jni/jni_token_fetcher.cc
|
| diff --git a/remoting/client/plugin/pepper_token_fetcher.cc b/remoting/client/jni/jni_token_fetcher.cc
|
| similarity index 51%
|
| copy from remoting/client/plugin/pepper_token_fetcher.cc
|
| copy to remoting/client/jni/jni_token_fetcher.cc
|
| index 7a7aca98a5dc31f775722ccff90114b06db19259..1a677852e655052f0cfc68270442854e42e94402 100644
|
| --- a/remoting/client/plugin/pepper_token_fetcher.cc
|
| +++ b/remoting/client/jni/jni_token_fetcher.cc
|
| @@ -1,35 +1,36 @@
|
| -// Copyright 2013 The Chromium Authors. All rights reserved.
|
| +// Copyright 2014 The Chromium Authors. All rights reserved.
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| -#include "remoting/client/plugin/pepper_token_fetcher.h"
|
| +#include "remoting/client/jni/jni_token_fetcher.h"
|
|
|
| -#include "remoting/client/plugin/chromoting_instance.h"
|
| +#include "remoting/client/jni/chromoting_jni_instance.h"
|
|
|
| namespace remoting {
|
|
|
| -PepperTokenFetcher::PepperTokenFetcher(base::WeakPtr<ChromotingInstance> plugin,
|
| - const std::string& host_public_key)
|
| - : plugin_(plugin),
|
| - host_public_key_(host_public_key),
|
| +JniTokenFetcher::JniTokenFetcher(
|
| + base::WeakPtr<ChromotingJniInstance> jni_instance,
|
| + const std::string& client_id)
|
| + : jni_instance_(jni_instance),
|
| + client_id_(client_id),
|
| weak_factory_(this) {
|
| }
|
|
|
| -PepperTokenFetcher::~PepperTokenFetcher() {
|
| +JniTokenFetcher::~JniTokenFetcher() {
|
| }
|
|
|
| -void PepperTokenFetcher::FetchThirdPartyToken(
|
| +void JniTokenFetcher::FetchThirdPartyToken(
|
| const GURL& token_url,
|
| const std::string& scope,
|
| const TokenFetchedCallback& token_fetched_callback) {
|
| - if (plugin_.get()) {
|
| + if (jni_instance_.get()) {
|
| token_fetched_callback_ = token_fetched_callback;
|
| - plugin_->FetchThirdPartyToken(token_url, host_public_key_, scope,
|
| + jni_instance_->FetchThirdPartyToken(token_url, client_id_, scope,
|
| weak_factory_.GetWeakPtr());
|
| }
|
| }
|
|
|
| -void PepperTokenFetcher::OnTokenFetched(
|
| +void JniTokenFetcher::OnTokenFetched(
|
| const std::string& token, const std::string& shared_secret) {
|
| if (!token_fetched_callback_.is_null()) {
|
| token_fetched_callback_.Run(token, shared_secret);
|
|
|