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 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
256 void OnMintTokenSuccess(const std::string& access_token, | 256 void OnMintTokenSuccess(const std::string& access_token, |
257 int time_to_live) override; | 257 int time_to_live) override; |
258 void OnMintTokenFailure(const GoogleServiceAuthError& error) override; | 258 void OnMintTokenFailure(const GoogleServiceAuthError& error) override; |
259 void OnIssueAdviceSuccess(const IssueAdviceInfo& issue_advice) override; | 259 void OnIssueAdviceSuccess(const IssueAdviceInfo& issue_advice) override; |
260 | 260 |
261 // IdentityAPI::ShutdownObserver implementation: | 261 // IdentityAPI::ShutdownObserver implementation: |
262 void OnShutdown() override; | 262 void OnShutdown() override; |
263 | 263 |
264 #if defined(OS_CHROMEOS) | 264 #if defined(OS_CHROMEOS) |
265 // Starts a login access token request for device robot account. This method | 265 // Starts a login access token request for device robot account. This method |
266 // will be called only in enterprise kiosk mode in ChromeOS. | 266 // will be called only in ChromeOS for: |
bartfab (slow)
2015/09/18 12:24:57
Nit: s/ChromeOS/Chrome OS/
kelvinp
2015/09/22 00:50:37
Done.
| |
267 // 1. Enterprise kiosk mode. | |
268 // 2. Whitelisted first party apps in public session. | |
267 virtual void StartDeviceLoginAccessTokenRequest(); | 269 virtual void StartDeviceLoginAccessTokenRequest(); |
270 | |
Andrew T Wilson (Slow)
2015/09/18 07:13:29
Two things:
1) This API should be private, not pu
kelvinp
2015/09/22 00:50:37
This function is private. I have added a test cas
| |
271 bool IsOriginWhitelistedInPublicSession(); | |
268 #endif | 272 #endif |
269 | 273 |
270 // Methods for invoking UI. Overridable for testing. | 274 // Methods for invoking UI. Overridable for testing. |
271 virtual void ShowLoginPopup(); | 275 virtual void ShowLoginPopup(); |
272 virtual void ShowOAuthApprovalDialog(const IssueAdviceInfo& issue_advice); | 276 virtual void ShowOAuthApprovalDialog(const IssueAdviceInfo& issue_advice); |
273 | 277 |
274 // Checks if there is a master login token to mint tokens for the extension. | 278 // Checks if there is a master login token to mint tokens for the extension. |
275 bool HasLoginToken() const; | 279 bool HasLoginToken() const; |
276 | 280 |
277 // Maps OAuth2 protocol errors to an error message returned to the | 281 // Maps OAuth2 protocol errors to an error message returned to the |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
348 // Helper to initialize final URL prefix. | 352 // Helper to initialize final URL prefix. |
349 void InitFinalRedirectURLPrefix(const std::string& extension_id); | 353 void InitFinalRedirectURLPrefix(const std::string& extension_id); |
350 | 354 |
351 scoped_ptr<WebAuthFlow> auth_flow_; | 355 scoped_ptr<WebAuthFlow> auth_flow_; |
352 GURL final_url_prefix_; | 356 GURL final_url_prefix_; |
353 }; | 357 }; |
354 | 358 |
355 } // namespace extensions | 359 } // namespace extensions |
356 | 360 |
357 #endif // CHROME_BROWSER_EXTENSIONS_API_IDENTITY_IDENTITY_API_H_ | 361 #endif // CHROME_BROWSER_EXTENSIONS_API_IDENTITY_IDENTITY_API_H_ |
OLD | NEW |