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 <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 extern const char kPageLoadFailure[]; | 53 extern const char kPageLoadFailure[]; |
54 extern const char kCanceled[]; | 54 extern const char kCanceled[]; |
55 } // namespace identity_constants | 55 } // namespace identity_constants |
56 | 56 |
57 class IdentityTokenCacheValue { | 57 class IdentityTokenCacheValue { |
58 public: | 58 public: |
59 IdentityTokenCacheValue(); | 59 IdentityTokenCacheValue(); |
60 explicit IdentityTokenCacheValue(const IssueAdviceInfo& issue_advice); | 60 explicit IdentityTokenCacheValue(const IssueAdviceInfo& issue_advice); |
61 IdentityTokenCacheValue(const std::string& token, | 61 IdentityTokenCacheValue(const std::string& token, |
62 base::TimeDelta time_to_live); | 62 base::TimeDelta time_to_live); |
| 63 IdentityTokenCacheValue(const IdentityTokenCacheValue& other); |
63 ~IdentityTokenCacheValue(); | 64 ~IdentityTokenCacheValue(); |
64 | 65 |
65 // Order of these entries is used to determine whether or not new | 66 // Order of these entries is used to determine whether or not new |
66 // entries supercede older ones in SetCachedToken. | 67 // entries supercede older ones in SetCachedToken. |
67 enum CacheValueStatus { | 68 enum CacheValueStatus { |
68 CACHE_STATUS_NOTFOUND, | 69 CACHE_STATUS_NOTFOUND, |
69 CACHE_STATUS_ADVICE, | 70 CACHE_STATUS_ADVICE, |
70 CACHE_STATUS_TOKEN | 71 CACHE_STATUS_TOKEN |
71 }; | 72 }; |
72 | 73 |
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
354 // Helper to initialize final URL prefix. | 355 // Helper to initialize final URL prefix. |
355 void InitFinalRedirectURLPrefix(const std::string& extension_id); | 356 void InitFinalRedirectURLPrefix(const std::string& extension_id); |
356 | 357 |
357 scoped_ptr<WebAuthFlow> auth_flow_; | 358 scoped_ptr<WebAuthFlow> auth_flow_; |
358 GURL final_url_prefix_; | 359 GURL final_url_prefix_; |
359 }; | 360 }; |
360 | 361 |
361 } // namespace extensions | 362 } // namespace extensions |
362 | 363 |
363 #endif // CHROME_BROWSER_EXTENSIONS_API_IDENTITY_IDENTITY_API_H_ | 364 #endif // CHROME_BROWSER_EXTENSIONS_API_IDENTITY_IDENTITY_API_H_ |
OLD | NEW |