Chromium Code Reviews| 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/renderer/render_frame_impl.h" | 5 #include "content/renderer/render_frame_impl.h" |
| 6 | 6 |
| 7 #include <map> | 7 #include <map> |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/auto_reset.h" | 10 #include "base/auto_reset.h" |
| (...skipping 2335 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2346 void RenderFrameImpl::willSendRequest( | 2346 void RenderFrameImpl::willSendRequest( |
| 2347 blink::WebLocalFrame* frame, | 2347 blink::WebLocalFrame* frame, |
| 2348 unsigned identifier, | 2348 unsigned identifier, |
| 2349 blink::WebURLRequest& request, | 2349 blink::WebURLRequest& request, |
| 2350 const blink::WebURLResponse& redirect_response) { | 2350 const blink::WebURLResponse& redirect_response) { |
| 2351 DCHECK(!frame_ || frame_ == frame); | 2351 DCHECK(!frame_ || frame_ == frame); |
| 2352 // The request my be empty during tests. | 2352 // The request my be empty during tests. |
| 2353 if (request.url().isEmpty()) | 2353 if (request.url().isEmpty()) |
| 2354 return; | 2354 return; |
| 2355 | 2355 |
| 2356 // Set the first party for cookies url if it has not been set yet (new | |
| 2357 // requests). For redirects, it is updated by WebURLLoaderImpl. | |
| 2358 if (request.firstPartyForCookies().isEmpty()) { | |
| 2359 if (request.targetType() == blink::WebURLRequest::TargetIsMainFrame) | |
| 2360 request.setFirstPartyForCookies(request.url()); | |
| 2361 else | |
| 2362 request.setFirstPartyForCookies(frame->top()->document().url()); | |
|
ppi
2014/06/05 15:27:16
Does it matter that we changed from ::firstPartyFo
clamy
2014/06/05 15:33:27
firstPartyForCookies is not in the public blink AP
ppi
2014/06/05 15:41:43
I agree it's probably fine, but the function seems
clamy
2014/06/05 16:05:00
My bad, missed it. In that case I agree that it is
| |
| 2363 } | |
| 2364 | |
| 2356 WebFrame* top_frame = frame->top(); | 2365 WebFrame* top_frame = frame->top(); |
| 2357 if (!top_frame) | 2366 if (!top_frame) |
| 2358 top_frame = frame; | 2367 top_frame = frame; |
| 2359 WebDataSource* provisional_data_source = top_frame->provisionalDataSource(); | 2368 WebDataSource* provisional_data_source = top_frame->provisionalDataSource(); |
| 2360 WebDataSource* top_data_source = top_frame->dataSource(); | 2369 WebDataSource* top_data_source = top_frame->dataSource(); |
| 2361 WebDataSource* data_source = | 2370 WebDataSource* data_source = |
| 2362 provisional_data_source ? provisional_data_source : top_data_source; | 2371 provisional_data_source ? provisional_data_source : top_data_source; |
| 2363 | 2372 |
| 2364 PageTransition transition_type = PAGE_TRANSITION_LINK; | 2373 PageTransition transition_type = PAGE_TRANSITION_LINK; |
| 2365 DocumentState* document_state = DocumentState::FromDataSource(data_source); | 2374 DocumentState* document_state = DocumentState::FromDataSource(data_source); |
| (...skipping 1177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3543 | 3552 |
| 3544 RendererCdmManager* RenderFrameImpl::GetCdmManager() { | 3553 RendererCdmManager* RenderFrameImpl::GetCdmManager() { |
| 3545 if (!cdm_manager_) | 3554 if (!cdm_manager_) |
| 3546 cdm_manager_ = new RendererCdmManager(this); | 3555 cdm_manager_ = new RendererCdmManager(this); |
| 3547 return cdm_manager_; | 3556 return cdm_manager_; |
| 3548 } | 3557 } |
| 3549 | 3558 |
| 3550 #endif // defined(OS_ANDROID) | 3559 #endif // defined(OS_ANDROID) |
| 3551 | 3560 |
| 3552 } // namespace content | 3561 } // namespace content |
| OLD | NEW |