| 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 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 157 } | 157 } |
| 158 | 158 |
| 159 ManageAccountsParams::ManageAccountsParams(const ManageAccountsParams& other) = | 159 ManageAccountsParams::ManageAccountsParams(const ManageAccountsParams& other) = |
| 160 default; | 160 default; |
| 161 | 161 |
| 162 bool SettingsAllowSigninCookies( | 162 bool SettingsAllowSigninCookies( |
| 163 const content_settings::CookieSettings* cookie_settings) { | 163 const content_settings::CookieSettings* cookie_settings) { |
| 164 GURL gaia_url = GaiaUrls::GetInstance()->gaia_url(); | 164 GURL gaia_url = GaiaUrls::GetInstance()->gaia_url(); |
| 165 GURL google_url = GaiaUrls::GetInstance()->google_url(); | 165 GURL google_url = GaiaUrls::GetInstance()->google_url(); |
| 166 return cookie_settings && | 166 return cookie_settings && |
| 167 cookie_settings->IsSettingCookieAllowed(gaia_url, gaia_url) && | 167 cookie_settings->IsCookieAccessAllowed(gaia_url, gaia_url) && |
| 168 cookie_settings->IsSettingCookieAllowed(google_url, google_url); | 168 cookie_settings->IsCookieAccessAllowed(google_url, google_url); |
| 169 } | 169 } |
| 170 | 170 |
| 171 std::string BuildMirrorRequestCookieIfPossible( | 171 std::string BuildMirrorRequestCookieIfPossible( |
| 172 const GURL& url, | 172 const GURL& url, |
| 173 const std::string& account_id, | 173 const std::string& account_id, |
| 174 const content_settings::CookieSettings* cookie_settings, | 174 const content_settings::CookieSettings* cookie_settings, |
| 175 int profile_mode_mask) { | 175 int profile_mode_mask) { |
| 176 return BuildMirrorRequestIfPossible(false /* is_header_request */, url, | 176 return BuildMirrorRequestIfPossible(false /* is_header_request */, url, |
| 177 account_id, cookie_settings, | 177 account_id, cookie_settings, |
| 178 profile_mode_mask); | 178 profile_mode_mask); |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 273 url, google_util::ALLOW_SUBDOMAIN, | 273 url, google_util::ALLOW_SUBDOMAIN, |
| 274 google_util::DISALLOW_NON_STANDARD_PORTS) || | 274 google_util::DISALLOW_NON_STANDARD_PORTS) || |
| 275 google_util::IsYoutubeDomainUrl( | 275 google_util::IsYoutubeDomainUrl( |
| 276 url, google_util::ALLOW_SUBDOMAIN, | 276 url, google_util::ALLOW_SUBDOMAIN, |
| 277 google_util::DISALLOW_NON_STANDARD_PORTS)); | 277 google_util::DISALLOW_NON_STANDARD_PORTS)); |
| 278 return is_google_url || IsDriveOrigin(origin) || | 278 return is_google_url || IsDriveOrigin(origin) || |
| 279 gaia::IsGaiaSignonRealm(origin); | 279 gaia::IsGaiaSignonRealm(origin); |
| 280 } | 280 } |
| 281 | 281 |
| 282 } // namespace signin | 282 } // namespace signin |
| OLD | NEW |