| OLD | NEW |
| 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 #ifndef CHROME_BROWSER_SIGNIN_ANDROID_PROFILE_OAUTH2_TOKEN_SERVICE_H_ | 5 #ifndef CHROME_BROWSER_SIGNIN_ANDROID_PROFILE_OAUTH2_TOKEN_SERVICE_H_ |
| 6 #define CHROME_BROWSER_SIGNIN_ANDROID_PROFILE_OAUTH2_TOKEN_SERVICE_H_ | 6 #define CHROME_BROWSER_SIGNIN_ANDROID_PROFILE_OAUTH2_TOKEN_SERVICE_H_ |
| 7 | 7 |
| 8 #include <jni.h> | 8 #include <jni.h> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 26 matching lines...) Expand all Loading... |
| 37 JNIEnv* env, jclass clazz, jobject j_profile_android); | 37 JNIEnv* env, jclass clazz, jobject j_profile_android); |
| 38 | 38 |
| 39 // Called by the TestingProfile class to disable account validation in | 39 // Called by the TestingProfile class to disable account validation in |
| 40 // tests. This prevents the token service from trying to look up system | 40 // tests. This prevents the token service from trying to look up system |
| 41 // accounts which requires special permission. | 41 // accounts which requires special permission. |
| 42 static void set_is_testing_profile() { | 42 static void set_is_testing_profile() { |
| 43 is_testing_profile_ = true; | 43 is_testing_profile_ = true; |
| 44 } | 44 } |
| 45 | 45 |
| 46 // ProfileOAuth2TokenService overrides: | 46 // ProfileOAuth2TokenService overrides: |
| 47 virtual void Initialize(SigninClient* client) override; | 47 virtual void Initialize( |
| 48 SigninClient* client, |
| 49 SigninErrorController* signin_error_controller) override; |
| 48 virtual bool RefreshTokenIsAvailable( | 50 virtual bool RefreshTokenIsAvailable( |
| 49 const std::string& account_id) const override; | 51 const std::string& account_id) const override; |
| 50 virtual void UpdateAuthError( | 52 virtual void UpdateAuthError( |
| 51 const std::string& account_id, | 53 const std::string& account_id, |
| 52 const GoogleServiceAuthError& error) override; | 54 const GoogleServiceAuthError& error) override; |
| 53 virtual std::vector<std::string> GetAccounts() override; | 55 virtual std::vector<std::string> GetAccounts() override; |
| 54 | 56 |
| 55 // Lists account at the OS level. | 57 // Lists account at the OS level. |
| 56 std::vector<std::string> GetSystemAccounts(); | 58 std::vector<std::string> GetSystemAccounts(); |
| 57 | 59 |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 bool force_notifications); | 126 bool force_notifications); |
| 125 | 127 |
| 126 base::android::ScopedJavaGlobalRef<jobject> java_ref_; | 128 base::android::ScopedJavaGlobalRef<jobject> java_ref_; |
| 127 | 129 |
| 128 static bool is_testing_profile_; | 130 static bool is_testing_profile_; |
| 129 | 131 |
| 130 DISALLOW_COPY_AND_ASSIGN(AndroidProfileOAuth2TokenService); | 132 DISALLOW_COPY_AND_ASSIGN(AndroidProfileOAuth2TokenService); |
| 131 }; | 133 }; |
| 132 | 134 |
| 133 #endif // CHROME_BROWSER_SIGNIN_ANDROID_PROFILE_OAUTH2_TOKEN_SERVICE_H_ | 135 #endif // CHROME_BROWSER_SIGNIN_ANDROID_PROFILE_OAUTH2_TOKEN_SERVICE_H_ |
| OLD | NEW |