Index: chrome/browser/signin/android_profile_oauth2_token_service.cc |
diff --git a/chrome/browser/signin/android_profile_oauth2_token_service.cc b/chrome/browser/signin/android_profile_oauth2_token_service.cc |
index 2d0da70df77f48ab229f5687e90cce93becefbea..b6a3d1e6b65d8a94a89f0ecf9c08e03f5751e7d0 100644 |
--- a/chrome/browser/signin/android_profile_oauth2_token_service.cc |
+++ b/chrome/browser/signin/android_profile_oauth2_token_service.cc |
@@ -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 |