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 CHROME_BROWSER_SIGNIN_SIGNIN_HEADER_HELPER_H_ | 5 #ifndef CHROME_BROWSER_SIGNIN_SIGNIN_HEADER_HELPER_H_ |
6 #define CHROME_BROWSER_SIGNIN_SIGNIN_HEADER_HELPER_H_ | 6 #define CHROME_BROWSER_SIGNIN_SIGNIN_HEADER_HELPER_H_ |
7 | 7 |
8 namespace net { | 8 namespace net { |
9 class URLRequest; | 9 class URLRequest; |
10 } | 10 } |
(...skipping 15 matching lines...) Expand all Loading... |
26 // Adding account disabled in the Android-for-EDU mode. | 26 // Adding account disabled in the Android-for-EDU mode. |
27 PROFILE_MODE_ADD_ACCOUNT_DISABLED = 1 << 1 | 27 PROFILE_MODE_ADD_ACCOUNT_DISABLED = 1 << 1 |
28 }; | 28 }; |
29 | 29 |
30 // The ServiceType specified by GAIA in the response header accompanying the 204 | 30 // The ServiceType specified by GAIA in the response header accompanying the 204 |
31 // response. This indicates the action Chrome is supposed to lead the user to | 31 // response. This indicates the action Chrome is supposed to lead the user to |
32 // perform. | 32 // perform. |
33 enum GAIAServiceType { | 33 enum GAIAServiceType { |
34 GAIA_SERVICE_TYPE_NONE = 0, // No GAIA response header. | 34 GAIA_SERVICE_TYPE_NONE = 0, // No GAIA response header. |
35 GAIA_SERVICE_TYPE_SIGNOUT, // Logout all existing sessions. | 35 GAIA_SERVICE_TYPE_SIGNOUT, // Logout all existing sessions. |
36 GAIA_SERVICE_TYPE_SIGNOUTOPTIONS_INCOGNITO, // Open an incognito tab. | 36 GAIA_SERVICE_TYPE_INCOGNITO, // Open an incognito tab. |
37 GAIA_SERVICE_TYPE_ADDSESSION, // Add a secondary account. | 37 GAIA_SERVICE_TYPE_ADDSESSION, // Add a secondary account. |
38 GAIA_SERVICE_TYPE_REAUTH, // Re-authenticate an account. | 38 GAIA_SERVICE_TYPE_REAUTH, // Re-authenticate an account. |
39 GAIA_SERVICE_TYPE_DEFAULT, // All other cases. | 39 GAIA_SERVICE_TYPE_DEFAULT, // All other cases. |
40 }; | 40 }; |
41 | 41 |
42 // Add X-Chrome-Connected header to all Gaia requests from a connected profile, | 42 // Add X-Chrome-Connected header to all Gaia requests from a connected profile, |
43 // with the exception of requests from gaia webview. Must be called on IO | 43 // with the exception of requests from gaia webview. Must be called on IO |
44 // thread. | 44 // thread. |
45 void AppendMirrorRequestHeaderIfPossible( | 45 void AppendMirrorRequestHeaderIfPossible( |
46 net::URLRequest* request, | 46 net::URLRequest* request, |
47 const GURL& redirect_url, | 47 const GURL& redirect_url, |
48 ProfileIOData* io_data, | 48 ProfileIOData* io_data, |
49 int child_id, | 49 int child_id, |
50 int route_id); | 50 int route_id); |
51 | 51 |
52 // Looks for the X-Chrome-Manage-Accounts response header, and if found, | 52 // Looks for the X-Chrome-Manage-Accounts response header, and if found, |
53 // tries to show the avatar bubble in the browser identified by the | 53 // tries to show the avatar bubble in the browser identified by the |
54 // child/route id. Must be called on IO thread. | 54 // child/route id. Must be called on IO thread. |
55 void ProcessMirrorResponseHeaderIfExists( | 55 void ProcessMirrorResponseHeaderIfExists( |
56 net::URLRequest* request, | 56 net::URLRequest* request, |
57 ProfileIOData* io_data, | 57 ProfileIOData* io_data, |
58 int child_id, | 58 int child_id, |
59 int route_id); | 59 int route_id); |
60 | 60 |
61 }; // namespace signin | 61 }; // namespace signin |
62 | 62 |
63 #endif // CHROME_BROWSER_SIGNIN_SIGNIN_HEADER_HELPER_H_ | 63 #endif // CHROME_BROWSER_SIGNIN_SIGNIN_HEADER_HELPER_H_ |
OLD | NEW |