| 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 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 | 81 |
| 82 // Overridden from OAuth2TokenService to complete signout of all | 82 // Overridden from OAuth2TokenService to complete signout of all |
| 83 // OA2TService aware accounts. | 83 // OA2TService aware accounts. |
| 84 virtual void RevokeAllCredentials() OVERRIDE; | 84 virtual void RevokeAllCredentials() OVERRIDE; |
| 85 | 85 |
| 86 protected: | 86 protected: |
| 87 friend class ProfileOAuth2TokenServiceFactory; | 87 friend class ProfileOAuth2TokenServiceFactory; |
| 88 AndroidProfileOAuth2TokenService(); | 88 AndroidProfileOAuth2TokenService(); |
| 89 virtual ~AndroidProfileOAuth2TokenService(); | 89 virtual ~AndroidProfileOAuth2TokenService(); |
| 90 | 90 |
| 91 // Overridden from OAuth2TokenService to intercept token fetch requests and | |
| 92 // redirect them to the Account Manager. | |
| 93 virtual void FetchOAuth2Token(RequestImpl* request, | |
| 94 const std::string& account_id, | |
| 95 net::URLRequestContextGetter* getter, | |
| 96 const std::string& client_id, | |
| 97 const std::string& client_secret, | |
| 98 const ScopeSet& scopes) OVERRIDE; | |
| 99 | |
| 100 // Overriden from OAuth2TokenService to avoid compile errors. Has NOTREACHED() | |
| 101 // implementation as |AndroidProfileOAuth2TokenService| overrides | |
| 102 // |FetchOAuth2Token| and thus bypasses this method entirely. | |
| 103 virtual OAuth2AccessTokenFetcher* CreateAccessTokenFetcher( | 91 virtual OAuth2AccessTokenFetcher* CreateAccessTokenFetcher( |
| 104 const std::string& account_id, | 92 const std::string& account_id, |
| 105 net::URLRequestContextGetter* getter, | 93 net::URLRequestContextGetter* getter, |
| 106 OAuth2AccessTokenConsumer* consumer) OVERRIDE; | 94 OAuth2AccessTokenConsumer* consumer) OVERRIDE; |
| 107 | 95 |
| 108 // Overridden from OAuth2TokenService to intercept token fetch requests and | 96 // Overridden from OAuth2TokenService to intercept token fetch requests and |
| 109 // redirect them to the Account Manager. | 97 // redirect them to the Account Manager. |
| 110 virtual void InvalidateOAuth2Token(const std::string& account_id, | 98 virtual void InvalidateOAuth2Token(const std::string& account_id, |
| 111 const std::string& client_id, | 99 const std::string& client_id, |
| 112 const ScopeSet& scopes, | 100 const ScopeSet& scopes, |
| (...skipping 20 matching lines...) Expand all Loading... |
| 133 | 121 |
| 134 private: | 122 private: |
| 135 base::android::ScopedJavaGlobalRef<jobject> java_ref_; | 123 base::android::ScopedJavaGlobalRef<jobject> java_ref_; |
| 136 | 124 |
| 137 static bool is_testing_profile_; | 125 static bool is_testing_profile_; |
| 138 | 126 |
| 139 DISALLOW_COPY_AND_ASSIGN(AndroidProfileOAuth2TokenService); | 127 DISALLOW_COPY_AND_ASSIGN(AndroidProfileOAuth2TokenService); |
| 140 }; | 128 }; |
| 141 | 129 |
| 142 #endif // CHROME_BROWSER_SIGNIN_ANDROID_PROFILE_OAUTH2_TOKEN_SERVICE_H_ | 130 #endif // CHROME_BROWSER_SIGNIN_ANDROID_PROFILE_OAUTH2_TOKEN_SERVICE_H_ |
| OLD | NEW |