Commit 5778babe authored by Newton Allen's avatar Newton Allen

Remove SigninManager.isNewProfileManagementEnabled().

This method is no longer used. All Android code assumes that new profile
management is enabled.

BUG=393335
R=aruslan@chromium.org

Review URL: https://codereview.chromium.org/890113002

Cr-Commit-Position: refs/heads/master@{#314252}
parent 6703c21c
......@@ -500,13 +500,6 @@ public class SigninManager {
}
}
/**
* @return True if the new profile management is enabled.
*/
public static boolean isNewProfileManagementEnabled() {
return nativeIsNewProfileManagementEnabled();
}
/**
* @return Whether there is a signed in account on the native side.
*/
......@@ -551,5 +544,4 @@ public class SigninManager {
private native void nativeClearLastSignedInUser(long nativeSigninManagerAndroid);
private native void nativeLogInSignedInUser(long nativeSigninManagerAndroid);
private native boolean nativeIsSignedInOnNative(long nativeSigninManagerAndroid);
private static native boolean nativeIsNewProfileManagementEnabled();
}
......@@ -270,29 +270,13 @@ void SigninManagerAndroid::MergeSessionCompleted(
void SigninManagerAndroid::LogInSignedInUser(JNIEnv* env, jobject obj) {
SigninManagerBase* signin_manager =
SigninManagerFactory::GetForProfile(profile_);
if (switches::IsNewProfileManagement()) {
// New Mirror code path that just fires the events and let the
// Account Reconcilor handles everything.
// Just fire the events and let the Account Reconcilor handles everything.
AndroidProfileOAuth2TokenService* token_service =
ProfileOAuth2TokenServiceFactory::GetPlatformSpecificForProfile(
profile_);
const std::string& primary_acct =
signin_manager->GetAuthenticatedAccountId();
token_service->ValidateAccounts(primary_acct, true);
} else {
DVLOG(1) << "SigninManagerAndroid::LogInSignedInUser "
" Manually calling MergeSessionHelper";
// Old code path that doesn't depend on the new Account Reconcilor.
// We manually login.
ProfileOAuth2TokenService* token_service =
ProfileOAuth2TokenServiceFactory::GetForProfile(profile_);
merge_session_helper_.reset(new MergeSessionHelper(
token_service, GaiaConstants::kChromeSource,
profile_->GetRequestContext(), this));
merge_session_helper_->LogIn(signin_manager->GetAuthenticatedAccountId());
}
}
jboolean SigninManagerAndroid::IsSigninAllowedByPolicy(JNIEnv* env,
......@@ -328,10 +312,6 @@ static jboolean ShouldLoadPolicyForUser(JNIEnv* env,
#endif
}
static jboolean IsNewProfileManagementEnabled(JNIEnv* env, jclass clazz) {
return switches::IsNewProfileManagement();
}
// static
bool SigninManagerAndroid::Register(JNIEnv* env) {
return RegisterNativesImpl(env);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment