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

Side by Side Diff: content/test/test_render_frame.cc

Issue 2813243002: network service: pass PlzNavigate resulting data via mojo data pipe (Closed)
Patch Set: . Created 3 years, 8 months 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/test/test_render_frame.h" 5 #include "content/test/test_render_frame.h"
6 6
7 #include "content/common/navigation_params.h" 7 #include "content/common/navigation_params.h"
8 #include "content/common/resource_request_body_impl.h" 8 #include "content/common/resource_request_body_impl.h"
9 #include "content/public/common/browser_side_navigation_policy.h" 9 #include "content/public/common/browser_side_navigation_policy.h"
10 #include "content/public/common/resource_response.h" 10 #include "content/public/common/resource_response.h"
(...skipping 12 matching lines...) Expand all
23 } 23 }
24 24
25 TestRenderFrame::~TestRenderFrame() { 25 TestRenderFrame::~TestRenderFrame() {
26 } 26 }
27 27
28 void TestRenderFrame::Navigate(const CommonNavigationParams& common_params, 28 void TestRenderFrame::Navigate(const CommonNavigationParams& common_params,
29 const StartNavigationParams& start_params, 29 const StartNavigationParams& start_params,
30 const RequestNavigationParams& request_params) { 30 const RequestNavigationParams& request_params) {
31 // PlzNavigate 31 // PlzNavigate
32 if (IsBrowserSideNavigationEnabled()) { 32 if (IsBrowserSideNavigationEnabled()) {
33 OnCommitNavigation(ResourceResponseHead(), GURL(), common_params, 33 OnCommitNavigation(ResourceResponseHead(), GURL(),
34 mojo::DataPipeConsumerHandle(), common_params,
34 request_params); 35 request_params);
35 } else { 36 } else {
36 OnNavigate(common_params, start_params, request_params); 37 OnNavigate(common_params, start_params, request_params);
37 } 38 }
38 } 39 }
39 40
40 void TestRenderFrame::SwapOut( 41 void TestRenderFrame::SwapOut(
41 int proxy_routing_id, 42 int proxy_routing_id,
42 bool is_loading, 43 bool is_loading,
43 const FrameReplicationState& replicated_frame_state) { 44 const FrameReplicationState& replicated_frame_state) {
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 GetWebFrame()->Parent() && info.form.IsNull()) { 83 GetWebFrame()->Parent() && info.form.IsNull()) {
83 // RenderViewTest::LoadHTML already disables PlzNavigate for the main frame 84 // RenderViewTest::LoadHTML already disables PlzNavigate for the main frame
84 // requests. However if the loaded html has a subframe, the WebURLRequest 85 // requests. However if the loaded html has a subframe, the WebURLRequest
85 // will be created inside Blink and it won't have this flag set. 86 // will be created inside Blink and it won't have this flag set.
86 info.url_request.SetCheckForBrowserSideNavigation(false); 87 info.url_request.SetCheckForBrowserSideNavigation(false);
87 } 88 }
88 return RenderFrameImpl::DecidePolicyForNavigation(info); 89 return RenderFrameImpl::DecidePolicyForNavigation(info);
89 } 90 }
90 91
91 } // namespace content 92 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698