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 COMPONENTS_SIGNIN_CORE_BROWSER_SIGNIN_HEADER_HELPER_H_ | 5 #ifndef COMPONENTS_SIGNIN_CORE_BROWSER_SIGNIN_HEADER_HELPER_H_ |
6 #define COMPONENTS_SIGNIN_CORE_BROWSER_SIGNIN_HEADER_HELPER_H_ | 6 #define COMPONENTS_SIGNIN_CORE_BROWSER_SIGNIN_HEADER_HELPER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "build/build_config.h" // For OS_IOS | 10 #include "build/build_config.h" // For OS_IOS |
(...skipping 12 matching lines...) Expand all Loading... |
23 | 23 |
24 // Profile mode flags. | 24 // Profile mode flags. |
25 enum ProfileMode { | 25 enum ProfileMode { |
26 PROFILE_MODE_DEFAULT = 0, | 26 PROFILE_MODE_DEFAULT = 0, |
27 // Incognito mode disabled by enterprise policy or by parental controls. | 27 // Incognito mode disabled by enterprise policy or by parental controls. |
28 PROFILE_MODE_INCOGNITO_DISABLED = 1 << 0, | 28 PROFILE_MODE_INCOGNITO_DISABLED = 1 << 0, |
29 // Adding account disabled in the Android-for-EDU mode. | 29 // Adding account disabled in the Android-for-EDU mode. |
30 PROFILE_MODE_ADD_ACCOUNT_DISABLED = 1 << 1 | 30 PROFILE_MODE_ADD_ACCOUNT_DISABLED = 1 << 1 |
31 }; | 31 }; |
32 | 32 |
| 33 extern const char kChromeConnectedHeader[]; |
| 34 |
33 // The ServiceType specified by GAIA in the response header accompanying the 204 | 35 // The ServiceType specified by GAIA in the response header accompanying the 204 |
34 // response. This indicates the action Chrome is supposed to lead the user to | 36 // response. This indicates the action Chrome is supposed to lead the user to |
35 // perform. | 37 // perform. |
36 enum GAIAServiceType { | 38 enum GAIAServiceType { |
37 GAIA_SERVICE_TYPE_NONE = 0, // No GAIA response header. | 39 GAIA_SERVICE_TYPE_NONE = 0, // No GAIA response header. |
38 GAIA_SERVICE_TYPE_SIGNOUT, // Logout all existing sessions. | 40 GAIA_SERVICE_TYPE_SIGNOUT, // Logout all existing sessions. |
39 GAIA_SERVICE_TYPE_INCOGNITO, // Open an incognito tab. | 41 GAIA_SERVICE_TYPE_INCOGNITO, // Open an incognito tab. |
40 GAIA_SERVICE_TYPE_ADDSESSION, // Add a secondary account. | 42 GAIA_SERVICE_TYPE_ADDSESSION, // Add a secondary account. |
41 GAIA_SERVICE_TYPE_REAUTH, // Re-authenticate an account. | 43 GAIA_SERVICE_TYPE_REAUTH, // Re-authenticate an account. |
42 GAIA_SERVICE_TYPE_SIGNUP, // Create a new account. | 44 GAIA_SERVICE_TYPE_SIGNUP, // Create a new account. |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
98 // Returns the parameters contained in the X-Chrome-Manage-Accounts response | 100 // Returns the parameters contained in the X-Chrome-Manage-Accounts response |
99 // header. | 101 // header. |
100 // If the request does not have a response header or if the header contains | 102 // If the request does not have a response header or if the header contains |
101 // garbage, then |service_type| is set to |GAIA_SERVICE_TYPE_NONE|. | 103 // garbage, then |service_type| is set to |GAIA_SERVICE_TYPE_NONE|. |
102 ManageAccountsParams BuildManageAccountsParamsIfExists(net::URLRequest* request, | 104 ManageAccountsParams BuildManageAccountsParamsIfExists(net::URLRequest* request, |
103 bool is_off_the_record); | 105 bool is_off_the_record); |
104 | 106 |
105 } // namespace signin | 107 } // namespace signin |
106 | 108 |
107 #endif // COMPONENTS_SIGNIN_CORE_BROWSER_SIGNIN_HEADER_HELPER_H_ | 109 #endif // COMPONENTS_SIGNIN_CORE_BROWSER_SIGNIN_HEADER_HELPER_H_ |
OLD | NEW |