Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(156)

Side by Side Diff: content/renderer/render_frame_impl.cc

Issue 626913004: Set the ui::PAGE_TRANSITION_CLIENT_REDIRECT flag. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix test case flakiness Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 2768 matching lines...) Expand 10 before | Expand all | Expand 10 after
2779 WebDataSource* top_data_source = top_frame->dataSource(); 2779 WebDataSource* top_data_source = top_frame->dataSource();
2780 WebDataSource* data_source = 2780 WebDataSource* data_source =
2781 provisional_data_source ? provisional_data_source : top_data_source; 2781 provisional_data_source ? provisional_data_source : top_data_source;
2782 2782
2783 DocumentState* document_state = DocumentState::FromDataSource(data_source); 2783 DocumentState* document_state = DocumentState::FromDataSource(data_source);
2784 DCHECK(document_state); 2784 DCHECK(document_state);
2785 InternalDocumentStateData* internal_data = 2785 InternalDocumentStateData* internal_data =
2786 InternalDocumentStateData::FromDocumentState(document_state); 2786 InternalDocumentStateData::FromDocumentState(document_state);
2787 NavigationState* navigation_state = document_state->navigation_state(); 2787 NavigationState* navigation_state = document_state->navigation_state();
2788 ui::PageTransition transition_type = navigation_state->transition_type(); 2788 ui::PageTransition transition_type = navigation_state->transition_type();
2789 WebDataSource* frame_ds = frame->provisionalDataSource();
2790 if (frame_ds && frame_ds->isClientRedirect()) {
2791 transition_type = ui::PageTransitionFromInt(
2792 transition_type | ui::PAGE_TRANSITION_CLIENT_REDIRECT);
2793 }
2789 2794
2790 GURL request_url(request.url()); 2795 GURL request_url(request.url());
2791 GURL new_url; 2796 GURL new_url;
2792 if (GetContentClient()->renderer()->WillSendRequest( 2797 if (GetContentClient()->renderer()->WillSendRequest(
2793 frame, 2798 frame,
2794 transition_type, 2799 transition_type,
2795 request_url, 2800 request_url,
2796 request.firstPartyForCookies(), 2801 request.firstPartyForCookies(),
2797 &new_url)) { 2802 &new_url)) {
2798 request.setURL(WebURL(new_url)); 2803 request.setURL(WebURL(new_url));
(...skipping 1395 matching lines...) Expand 10 before | Expand all | Expand 10 after
4194 4199
4195 #if defined(ENABLE_BROWSER_CDMS) 4200 #if defined(ENABLE_BROWSER_CDMS)
4196 RendererCdmManager* RenderFrameImpl::GetCdmManager() { 4201 RendererCdmManager* RenderFrameImpl::GetCdmManager() {
4197 if (!cdm_manager_) 4202 if (!cdm_manager_)
4198 cdm_manager_ = new RendererCdmManager(this); 4203 cdm_manager_ = new RendererCdmManager(this);
4199 return cdm_manager_; 4204 return cdm_manager_;
4200 } 4205 }
4201 #endif // defined(ENABLE_BROWSER_CDMS) 4206 #endif // defined(ENABLE_BROWSER_CDMS)
4202 4207
4203 } // namespace content 4208 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/loader/resource_dispatcher_host_browsertest.cc ('k') | content/test/data/client_redirect.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698