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

Side by Side Diff: chrome/browser/android/signin/signin_manager_android.cc

Issue 138673005: Call RemoveObserver in AndroidSigninManager (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 11 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/android/signin/signin_manager_android.h" 5 #include "chrome/browser/android/signin/signin_manager_android.h"
6 6
7 #include "base/android/jni_android.h" 7 #include "base/android/jni_android.h"
8 #include "base/android/jni_string.h" 8 #include "base/android/jni_string.h"
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 // well, so that the next signin doesn't trigger the acount change dialog. 201 // well, so that the next signin doesn't trigger the acount change dialog.
202 profile_->GetPrefs()->ClearPref(prefs::kGoogleServicesLastUsername); 202 profile_->GetPrefs()->ClearPref(prefs::kGoogleServicesLastUsername);
203 203
204 Java_SigninManager_onProfileDataWiped(base::android::AttachCurrentThread(), 204 Java_SigninManager_onProfileDataWiped(base::android::AttachCurrentThread(),
205 java_signin_manager_.obj()); 205 java_signin_manager_.obj());
206 } 206 }
207 207
208 void SigninManagerAndroid::MergeSessionCompleted( 208 void SigninManagerAndroid::MergeSessionCompleted(
209 const std::string& account_id, 209 const std::string& account_id,
210 const GoogleServiceAuthError& error) { 210 const GoogleServiceAuthError& error) {
211 merge_session_helper_->RemoveObserver(this);
211 merge_session_helper_.reset(); 212 merge_session_helper_.reset();
212 } 213 }
213 214
214 void SigninManagerAndroid::LogInSignedInUser(JNIEnv* env, jobject obj) { 215 void SigninManagerAndroid::LogInSignedInUser(JNIEnv* env, jobject obj) {
215 if (switches::IsNewProfileManagement()) { 216 if (switches::IsNewProfileManagement()) {
216 // New Mirror code path that just fires the events and let the 217 // New Mirror code path that just fires the events and let the
217 // Account Reconcilor handles everything. 218 // Account Reconcilor handles everything.
218 AndroidProfileOAuth2TokenService* token_service = 219 AndroidProfileOAuth2TokenService* token_service =
219 ProfileOAuth2TokenServiceFactory::GetPlatformSpecificForProfile( 220 ProfileOAuth2TokenServiceFactory::GetPlatformSpecificForProfile(
220 profile_); 221 profile_);
(...skipping 29 matching lines...) Expand all
250 return !policy::BrowserPolicyConnector::IsNonEnterpriseUser(username); 251 return !policy::BrowserPolicyConnector::IsNonEnterpriseUser(username);
251 #else 252 #else
252 return false; 253 return false;
253 #endif 254 #endif
254 } 255 }
255 256
256 // static 257 // static
257 bool SigninManagerAndroid::Register(JNIEnv* env) { 258 bool SigninManagerAndroid::Register(JNIEnv* env) {
258 return RegisterNativesImpl(env); 259 return RegisterNativesImpl(env);
259 } 260 }
OLDNEW
« 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