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

Unified Diff: chrome/browser/android/signin/signin_manager_android.cc

Issue 255013004: Refactor code to clear last signed-in user. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 8 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 | « chrome/browser/android/signin/signin_manager_android.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/android/signin/signin_manager_android.cc
diff --git a/chrome/browser/android/signin/signin_manager_android.cc b/chrome/browser/android/signin/signin_manager_android.cc
index 43af5fad4c0a5d77c680351fdcd4e2353f87a9c8..2fac5f7e11c2911ad21369038af928aa0ee49c7b 100644
--- a/chrome/browser/android/signin/signin_manager_android.cc
+++ b/chrome/browser/android/signin/signin_manager_android.cc
@@ -201,12 +201,20 @@ void SigninManagerAndroid::OnBrowsingDataRemoverDone() {
// All the Profile data has been wiped. Clear the last signed in username as
// well, so that the next signin doesn't trigger the acount change dialog.
- profile_->GetPrefs()->ClearPref(prefs::kGoogleServicesLastUsername);
+ ClearLastSignedInUser();
Java_SigninManager_onProfileDataWiped(base::android::AttachCurrentThread(),
java_signin_manager_.obj());
}
+void SigninManagerAndroid::ClearLastSignedInUser(JNIEnv* env, jobject obj) {
nyquist 2014/04/29 17:18:47 I was under impression that the style guide said n
acleung1 2014/04/29 21:45:54 I can't seem to find that in the style guide. The
nyquist 2014/04/29 22:14:54 Ah. That might be it. Or that I was reading the "o
+ ClearLastSignedInUser();
+}
+
+void SigninManagerAndroid::ClearLastSignedInUser() {
+ profile_->GetPrefs()->ClearPref(prefs::kGoogleServicesLastUsername);
+}
+
void SigninManagerAndroid::MergeSessionCompleted(
const std::string& account_id,
const GoogleServiceAuthError& error) {
« no previous file with comments | « chrome/browser/android/signin/signin_manager_android.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698