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

Side by Side Diff: remoting/android/java/src/org/chromium/chromoting/Chromoting.java

Issue 407403002: Chromoting: Synchronize connected/disconnected state between Java/C++ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Move connection logic into Java 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
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 package org.chromium.chromoting; 5 package org.chromium.chromoting;
6 6
7 import android.accounts.Account; 7 import android.accounts.Account;
8 import android.accounts.AccountManager; 8 import android.accounts.AccountManager;
9 import android.accounts.AccountManagerCallback; 9 import android.accounts.AccountManagerCallback;
10 import android.accounts.AccountManagerFuture; 10 import android.accounts.AccountManagerFuture;
(...skipping 456 matching lines...) Expand 10 before | Expand all | Expand 10 after
467 public void onTokenFetched(String code, String accessToken) { 467 public void onTokenFetched(String code, String accessToken) {
468 // The native client sends the OAuth authorization code to the h ost as the token so 468 // The native client sends the OAuth authorization code to the h ost as the token so
469 // that the host can obtain the shared secret from the third par ty authorization 469 // that the host can obtain the shared secret from the third par ty authorization
470 // server. 470 // server.
471 String token = code; 471 String token = code;
472 472
473 // The native client uses the OAuth access token as the shared s ecret to 473 // The native client uses the OAuth access token as the shared s ecret to
474 // authenticate itself with the host using spake. 474 // authenticate itself with the host using spake.
475 String sharedSecret = accessToken; 475 String sharedSecret = accessToken;
476 476
477 JniInterface.nativeOnThirdPartyTokenFetched(token, sharedSecret) ; 477 JniInterface.onThirdPartyTokenFetched(token, sharedSecret);
478 } 478 }
479 }; 479 };
480 return new ThirdPartyTokenFetcher(this, host.getTokenUrlPatterns(), call back); 480 return new ThirdPartyTokenFetcher(this, host.getTokenUrlPatterns(), call back);
481 } 481 }
482 482
483 public void fetchThirdPartyToken(String tokenUrl, String clientId, String sc ope) { 483 public void fetchThirdPartyToken(String tokenUrl, String clientId, String sc ope) {
484 assert mTokenFetcher != null; 484 assert mTokenFetcher != null;
485 mTokenFetcher.fetchToken(tokenUrl, clientId, scope); 485 mTokenFetcher.fetchToken(tokenUrl, clientId, scope);
486 } 486 }
487 } 487 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698