| 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 package org.chromium.chrome.browser.signin; | 5 package org.chromium.chrome.browser.signin; |
| 6 | 6 |
| 7 import android.accounts.Account; | 7 import android.accounts.Account; |
| 8 import android.app.Activity; | 8 import android.app.Activity; |
| 9 import android.app.AlertDialog; | 9 import android.app.AlertDialog; |
| 10 import android.app.Dialog; | 10 import android.app.Dialog; |
| (...skipping 353 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 364 // Tell the native side that sign-in has completed. | 364 // Tell the native side that sign-in has completed. |
| 365 nativeOnSignInCompleted(mNativeSigninManagerAndroid, mSignInAccount.name
, | 365 nativeOnSignInCompleted(mNativeSigninManagerAndroid, mSignInAccount.name
, |
| 366 accountIdsAndNames.mAccountIds, accountIdsAndNam
es.mAccountNames); | 366 accountIdsAndNames.mAccountIds, accountIdsAndNam
es.mAccountNames); |
| 367 | 367 |
| 368 // Register for invalidations. | 368 // Register for invalidations. |
| 369 InvalidationController invalidationController = InvalidationController.g
et(mContext); | 369 InvalidationController invalidationController = InvalidationController.g
et(mContext); |
| 370 invalidationController.setRegisteredTypes(mSignInAccount, true, new Hash
Set<ModelType>()); | 370 invalidationController.setRegisteredTypes(mSignInAccount, true, new Hash
Set<ModelType>()); |
| 371 | 371 |
| 372 // Sign-in to sync. | 372 // Sign-in to sync. |
| 373 ProfileSyncService profileSyncService = ProfileSyncService.get(mContext)
; | 373 ProfileSyncService profileSyncService = ProfileSyncService.get(mContext)
; |
| 374 if (AndroidSyncSettings.get(mContext).isSyncEnabled(mSignInAccount) | 374 if (AndroidSyncSettings.get(mContext).isSyncEnabled() |
| 375 && !profileSyncService.hasSyncSetupCompleted()) { | 375 && !profileSyncService.hasSyncSetupCompleted()) { |
| 376 profileSyncService.setSetupInProgress(true); | 376 profileSyncService.setSetupInProgress(true); |
| 377 profileSyncService.syncSignIn(); | 377 profileSyncService.syncSignIn(); |
| 378 } | 378 } |
| 379 | 379 |
| 380 if (mSignInFlowObserver != null) | 380 if (mSignInFlowObserver != null) |
| 381 mSignInFlowObserver.onSigninComplete(); | 381 mSignInFlowObserver.onSigninComplete(); |
| 382 | 382 |
| 383 // All done, cleanup. | 383 // All done, cleanup. |
| 384 Log.d(TAG, "Signin done"); | 384 Log.d(TAG, "Signin done"); |
| (...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 546 private native void nativeOnSignInCompleted(long nativeSigninManagerAndroid,
String username, | 546 private native void nativeOnSignInCompleted(long nativeSigninManagerAndroid,
String username, |
| 547 String[] accountIds, String[] ac
countNames); | 547 String[] accountIds, String[] ac
countNames); |
| 548 private native void nativeSignOut(long nativeSigninManagerAndroid); | 548 private native void nativeSignOut(long nativeSigninManagerAndroid); |
| 549 private native String nativeGetManagementDomain(long nativeSigninManagerAndr
oid); | 549 private native String nativeGetManagementDomain(long nativeSigninManagerAndr
oid); |
| 550 private native void nativeWipeProfileData(long nativeSigninManagerAndroid); | 550 private native void nativeWipeProfileData(long nativeSigninManagerAndroid); |
| 551 private native void nativeClearLastSignedInUser(long nativeSigninManagerAndr
oid); | 551 private native void nativeClearLastSignedInUser(long nativeSigninManagerAndr
oid); |
| 552 private native void nativeLogInSignedInUser(long nativeSigninManagerAndroid)
; | 552 private native void nativeLogInSignedInUser(long nativeSigninManagerAndroid)
; |
| 553 private native boolean nativeIsSignedInOnNative(long nativeSigninManagerAndr
oid); | 553 private native boolean nativeIsSignedInOnNative(long nativeSigninManagerAndr
oid); |
| 554 private static native boolean nativeIsNewProfileManagementEnabled(); | 554 private static native boolean nativeIsNewProfileManagementEnabled(); |
| 555 } | 555 } |
| OLD | NEW |