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 #include "components/signin/core/browser/signin_header_helper.h" | 5 #include "components/signin/core/browser/signin_header_helper.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include "base/macros.h" | 9 #include "base/macros.h" |
10 #include "base/strings/string_number_conversions.h" | 10 #include "base/strings/string_number_conversions.h" |
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
136 email(""), | 136 email(""), |
137 is_saml(false), | 137 is_saml(false), |
138 continue_url(""), | 138 continue_url(""), |
139 is_same_tab(false) { | 139 is_same_tab(false) { |
140 #if !defined(OS_IOS) | 140 #if !defined(OS_IOS) |
141 child_id = 0; | 141 child_id = 0; |
142 route_id = 0; | 142 route_id = 0; |
143 #endif // !defined(OS_IOS) | 143 #endif // !defined(OS_IOS) |
144 } | 144 } |
145 | 145 |
| 146 ManageAccountsParams::ManageAccountsParams(const ManageAccountsParams& other) = |
| 147 default; |
| 148 |
146 bool SettingsAllowSigninCookies( | 149 bool SettingsAllowSigninCookies( |
147 const content_settings::CookieSettings* cookie_settings) { | 150 const content_settings::CookieSettings* cookie_settings) { |
148 GURL gaia_url = GaiaUrls::GetInstance()->gaia_url(); | 151 GURL gaia_url = GaiaUrls::GetInstance()->gaia_url(); |
149 GURL google_url = GaiaUrls::GetInstance()->google_url(); | 152 GURL google_url = GaiaUrls::GetInstance()->google_url(); |
150 return cookie_settings && | 153 return cookie_settings && |
151 cookie_settings->IsSettingCookieAllowed(gaia_url, gaia_url) && | 154 cookie_settings->IsSettingCookieAllowed(gaia_url, gaia_url) && |
152 cookie_settings->IsSettingCookieAllowed(google_url, google_url); | 155 cookie_settings->IsSettingCookieAllowed(google_url, google_url); |
153 } | 156 } |
154 | 157 |
155 std::string BuildMirrorRequestCookieIfPossible( | 158 std::string BuildMirrorRequestCookieIfPossible( |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
214 if (!request->response_headers()->GetNormalizedHeader( | 217 if (!request->response_headers()->GetNormalizedHeader( |
215 kChromeManageAccountsHeader, &header_value)) { | 218 kChromeManageAccountsHeader, &header_value)) { |
216 return empty_params; | 219 return empty_params; |
217 } | 220 } |
218 | 221 |
219 DCHECK(switches::IsEnableAccountConsistency() && !is_off_the_record); | 222 DCHECK(switches::IsEnableAccountConsistency() && !is_off_the_record); |
220 return BuildManageAccountsParams(header_value); | 223 return BuildManageAccountsParams(header_value); |
221 } | 224 } |
222 | 225 |
223 } // namespace signin | 226 } // namespace signin |
OLD | NEW |