| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_EXTENSIONS_API_IDENTITY_IDENTITY_API_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_IDENTITY_IDENTITY_API_H_ |
| 6 #define CHROME_BROWSER_EXTENSIONS_API_IDENTITY_IDENTITY_API_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_API_IDENTITY_IDENTITY_API_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 namespace identity_constants { | 32 namespace identity_constants { |
| 33 extern const char kInvalidClientId[]; | 33 extern const char kInvalidClientId[]; |
| 34 extern const char kInvalidScopes[]; | 34 extern const char kInvalidScopes[]; |
| 35 extern const char kAuthFailure[]; | 35 extern const char kAuthFailure[]; |
| 36 extern const char kNoGrant[]; | 36 extern const char kNoGrant[]; |
| 37 extern const char kUserRejected[]; | 37 extern const char kUserRejected[]; |
| 38 extern const char kUserNotSignedIn[]; | 38 extern const char kUserNotSignedIn[]; |
| 39 extern const char kInteractionRequired[]; | 39 extern const char kInteractionRequired[]; |
| 40 extern const char kInvalidRedirect[]; | 40 extern const char kInvalidRedirect[]; |
| 41 extern const char kOffTheRecord[]; | 41 extern const char kOffTheRecord[]; |
| 42 extern const char kPageLoadFailure[]; |
| 42 } // namespace identity_constants | 43 } // namespace identity_constants |
| 43 | 44 |
| 44 // identity.getAuthToken fetches an OAuth 2 function for the | 45 // identity.getAuthToken fetches an OAuth 2 function for the |
| 45 // caller. The request has three sub-flows: non-interactive, | 46 // caller. The request has three sub-flows: non-interactive, |
| 46 // interactive, and sign-in. | 47 // interactive, and sign-in. |
| 47 // | 48 // |
| 48 // In the non-interactive flow, getAuthToken requests a token from | 49 // In the non-interactive flow, getAuthToken requests a token from |
| 49 // GAIA. GAIA may respond with a token, an error, or "consent | 50 // GAIA. GAIA may respond with a token, an error, or "consent |
| 50 // required". In the consent required cases, getAuthToken proceeds to | 51 // required". In the consent required cases, getAuthToken proceeds to |
| 51 // the second, interactive phase. | 52 // the second, interactive phase. |
| (...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 270 IdentityMintRequestQueue mint_queue_; | 271 IdentityMintRequestQueue mint_queue_; |
| 271 std::map<TokenCacheKey, IdentityTokenCacheValue> token_cache_; | 272 std::map<TokenCacheKey, IdentityTokenCacheValue> token_cache_; |
| 272 }; | 273 }; |
| 273 | 274 |
| 274 template <> | 275 template <> |
| 275 void ProfileKeyedAPIFactory<IdentityAPI>::DeclareFactoryDependencies(); | 276 void ProfileKeyedAPIFactory<IdentityAPI>::DeclareFactoryDependencies(); |
| 276 | 277 |
| 277 } // namespace extensions | 278 } // namespace extensions |
| 278 | 279 |
| 279 #endif // CHROME_BROWSER_EXTENSIONS_API_IDENTITY_IDENTITY_API_H_ | 280 #endif // CHROME_BROWSER_EXTENSIONS_API_IDENTITY_IDENTITY_API_H_ |
| OLD | NEW |