| 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 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 160 // Unit tests may override extension_id. | 160 // Unit tests may override extension_id. |
| 161 void InitFinalRedirectURLPrefixesForTest(const std::string& extension_id); | 161 void InitFinalRedirectURLPrefixesForTest(const std::string& extension_id); |
| 162 | 162 |
| 163 private: | 163 private: |
| 164 virtual ~IdentityLaunchWebAuthFlowFunction(); | 164 virtual ~IdentityLaunchWebAuthFlowFunction(); |
| 165 virtual bool RunImpl() OVERRIDE; | 165 virtual bool RunImpl() OVERRIDE; |
| 166 | 166 |
| 167 // WebAuthFlow::Delegate implementation. | 167 // WebAuthFlow::Delegate implementation. |
| 168 virtual void OnAuthFlowFailure(WebAuthFlow::Failure failure) OVERRIDE; | 168 virtual void OnAuthFlowFailure(WebAuthFlow::Failure failure) OVERRIDE; |
| 169 virtual void OnAuthFlowURLChange(const GURL& redirect_url) OVERRIDE; | 169 virtual void OnAuthFlowURLChange(const GURL& redirect_url) OVERRIDE; |
| 170 virtual void OnAuthFlowClosed() OVERRIDE; |
| 170 | 171 |
| 171 // Helper to initialize final URLs vector. | 172 // Helper to initialize final URLs vector. |
| 172 void InitFinalRedirectURLPrefixes(const std::string& extension_id); | 173 void InitFinalRedirectURLPrefixes(const std::string& extension_id); |
| 173 | 174 |
| 174 scoped_ptr<WebAuthFlow> auth_flow_; | 175 scoped_ptr<WebAuthFlow> auth_flow_; |
| 175 std::vector<GURL> final_prefixes_; | 176 std::vector<GURL> final_prefixes_; |
| 176 }; | 177 }; |
| 177 | 178 |
| 178 class IdentityTokenCacheValue { | 179 class IdentityTokenCacheValue { |
| 179 public: | 180 public: |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 265 IdentityMintRequestQueue mint_queue_; | 266 IdentityMintRequestQueue mint_queue_; |
| 266 std::map<TokenCacheKey, IdentityTokenCacheValue> token_cache_; | 267 std::map<TokenCacheKey, IdentityTokenCacheValue> token_cache_; |
| 267 }; | 268 }; |
| 268 | 269 |
| 269 template <> | 270 template <> |
| 270 void ProfileKeyedAPIFactory<IdentityAPI>::DeclareFactoryDependencies(); | 271 void ProfileKeyedAPIFactory<IdentityAPI>::DeclareFactoryDependencies(); |
| 271 | 272 |
| 272 } // namespace extensions | 273 } // namespace extensions |
| 273 | 274 |
| 274 #endif // CHROME_BROWSER_EXTENSIONS_API_IDENTITY_IDENTITY_API_H_ | 275 #endif // CHROME_BROWSER_EXTENSIONS_API_IDENTITY_IDENTITY_API_H_ |
| OLD | NEW |