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

Unified Diff: chrome/browser/signin/android_profile_oauth2_token_service.cc

Issue 401693003: Notify Java O2TS when revoking all tokens. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698