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

Side by Side Diff: chrome/browser/signin/android_profile_oauth2_token_service.cc

Issue 809313009: Make the SigninErrorController a PKS. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Copyrighted: 2015 Created 5 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
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/signin/android_profile_oauth2_token_service.h" 5 #include "chrome/browser/signin/android_profile_oauth2_token_service.h"
6 6
7 #include "base/android/jni_android.h" 7 #include "base/android/jni_android.h"
8 #include "base/android/jni_array.h" 8 #include "base/android/jni_array.h"
9 #include "base/android/jni_string.h" 9 #include "base/android/jni_string.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 return service->java_ref_.obj(); 152 return service->java_ref_.obj();
153 } 153 }
154 154
155 static jobject GetForProfile(JNIEnv* env, 155 static jobject GetForProfile(JNIEnv* env,
156 jclass clazz, 156 jclass clazz,
157 jobject j_profile_android) { 157 jobject j_profile_android) {
158 return AndroidProfileOAuth2TokenService::GetForProfile( 158 return AndroidProfileOAuth2TokenService::GetForProfile(
159 env, clazz, j_profile_android); 159 env, clazz, j_profile_android);
160 } 160 }
161 161
162 void AndroidProfileOAuth2TokenService::Initialize(SigninClient* client) { 162 void AndroidProfileOAuth2TokenService::Initialize(
163 SigninClient* client,
164 SigninErrorController* signin_error_controller) {
163 DVLOG(1) << "AndroidProfileOAuth2TokenService::Initialize"; 165 DVLOG(1) << "AndroidProfileOAuth2TokenService::Initialize";
164 ProfileOAuth2TokenService::Initialize(client); 166 ProfileOAuth2TokenService::Initialize(client, signin_error_controller);
165 167
166 if (!is_testing_profile_) { 168 if (!is_testing_profile_) {
167 Java_OAuth2TokenService_validateAccounts( 169 Java_OAuth2TokenService_validateAccounts(
168 AttachCurrentThread(), java_ref_.obj(), 170 AttachCurrentThread(), java_ref_.obj(),
169 base::android::GetApplicationContext(), JNI_TRUE); 171 base::android::GetApplicationContext(), JNI_TRUE);
170 } 172 }
171 } 173 }
172 174
173 bool AndroidProfileOAuth2TokenService::RefreshTokenIsAvailable( 175 bool AndroidProfileOAuth2TokenService::RefreshTokenIsAvailable(
174 const std::string& account_id) const { 176 const std::string& account_id) const {
(...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after
467 GoogleServiceAuthError err(result ? 469 GoogleServiceAuthError err(result ?
468 GoogleServiceAuthError::NONE : 470 GoogleServiceAuthError::NONE :
469 GoogleServiceAuthError::CONNECTION_FAILED); 471 GoogleServiceAuthError::CONNECTION_FAILED);
470 heap_callback->Run(err, token, base::Time()); 472 heap_callback->Run(err, token, base::Time());
471 } 473 }
472 474
473 // static 475 // static
474 bool AndroidProfileOAuth2TokenService::Register(JNIEnv* env) { 476 bool AndroidProfileOAuth2TokenService::Register(JNIEnv* env) {
475 return RegisterNativesImpl(env); 477 return RegisterNativesImpl(env);
476 } 478 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698