Commit 4eabdf84 authored by acleung@chromium.org's avatar acleung@chromium.org

Notify Java O2TS when revoking all tokens.

During a forced signout (sync account removed from device), we signout without ever
give the token service a chance to validate accounts. Without this CL, the AO2TS
becomes out-of-sync with the device's account list.

BUG=393037

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@284218 0039d316-1c4b-4281-b951-d872f2087c98
parent f682ca9a
......@@ -371,6 +371,14 @@ void AndroidProfileOAuth2TokenService::RevokeAllCredentials() {
it != accounts.end(); it++) {
FireRefreshTokenRevoked(*it);
}
// Clear everything on the Java side as well.
std::vector<std::string> empty;
JNIEnv* env = AttachCurrentThread();
ScopedJavaLocalRef<jobjectArray> java_accounts(
base::android::ToJavaArrayOfStrings(env, empty));
Java_OAuth2TokenService_saveStoredAccounts(
env, base::android::GetApplicationContext(), java_accounts.obj());
}
// Called from Java when fetching of an OAuth2 token is finished. The
......
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