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 "content/browser/frame_host/render_frame_message_filter.h" | 5 #include "content/browser/frame_host/render_frame_message_filter.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 #include "base/metrics/field_trial.h" | 9 #include "base/metrics/field_trial.h" |
10 #include "base/strings/string_util.h" | 10 #include "base/strings/string_util.h" |
(...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
387 | 387 |
388 // If we crash here, figure out what URL the renderer was requesting. | 388 // If we crash here, figure out what URL the renderer was requesting. |
389 // http://crbug.com/99242 | 389 // http://crbug.com/99242 |
390 char url_buf[128]; | 390 char url_buf[128]; |
391 base::strlcpy(url_buf, url.spec().c_str(), arraysize(url_buf)); | 391 base::strlcpy(url_buf, url.spec().c_str(), arraysize(url_buf)); |
392 base::debug::Alias(url_buf); | 392 base::debug::Alias(url_buf); |
393 | 393 |
394 net::URLRequestContext* context = GetRequestContextForURL(url); | 394 net::URLRequestContext* context = GetRequestContextForURL(url); |
395 | 395 |
396 net::CookieOptions options; | 396 net::CookieOptions options; |
397 options.set_include_same_site(); | 397 options.set_same_site_mode( |
398 net::CookieOptions::SameSiteMode::INCLUDE_STRICT_AND_LAX); | |
mmenke
2016/03/17 19:15:56
Is this right? Seems like for an iframe with an o
Mike West
2016/03/17 19:57:11
Hrm. I think you're right, which is unfortunate, a
Mike West
2016/03/18 14:27:17
Done, and added a browser test to cover.
| |
398 context->cookie_store()->GetCookieListWithOptionsAsync( | 399 context->cookie_store()->GetCookieListWithOptionsAsync( |
399 url, options, | 400 url, options, |
400 base::Bind(&RenderFrameMessageFilter::CheckPolicyForCookies, this, | 401 base::Bind(&RenderFrameMessageFilter::CheckPolicyForCookies, this, |
401 render_frame_id, url, first_party_for_cookies, reply_msg)); | 402 render_frame_id, url, first_party_for_cookies, reply_msg)); |
402 } | 403 } |
403 | 404 |
404 void RenderFrameMessageFilter::OnCookiesEnabled( | 405 void RenderFrameMessageFilter::OnCookiesEnabled( |
405 int render_frame_id, | 406 int render_frame_id, |
406 const GURL& url, | 407 const GURL& url, |
407 const GURL& first_party_for_cookies, | 408 const GURL& first_party_for_cookies, |
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
648 net::URLRequestContext* context = | 649 net::URLRequestContext* context = |
649 GetContentClient()->browser()->OverrideRequestContextForURL( | 650 GetContentClient()->browser()->OverrideRequestContextForURL( |
650 url, resource_context_); | 651 url, resource_context_); |
651 if (!context) | 652 if (!context) |
652 context = request_context_->GetURLRequestContext(); | 653 context = request_context_->GetURLRequestContext(); |
653 | 654 |
654 return context; | 655 return context; |
655 } | 656 } |
656 | 657 |
657 } // namespace content | 658 } // namespace content |
OLD | NEW |