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

Side by Side Diff: content/browser/frame_host/navigation_entry_impl.cc

Issue 1678303004: PlzNavigate: inform the renderer that a navigation is a POST (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 9 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 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/navigation_entry_impl.h" 5 #include "content/browser/frame_host/navigation_entry_impl.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <queue> 9 #include <queue>
10 10
(...skipping 566 matching lines...) Expand 10 before | Expand all | Expand 10 after
577 #if defined(OS_ANDROID) 577 #if defined(OS_ANDROID)
578 if (!intent_received_timestamp().is_null()) 578 if (!intent_received_timestamp().is_null())
579 report_type = FrameMsg_UILoadMetricsReportType::REPORT_INTENT; 579 report_type = FrameMsg_UILoadMetricsReportType::REPORT_INTENT;
580 ui_timestamp = intent_received_timestamp(); 580 ui_timestamp = intent_received_timestamp();
581 #endif 581 #endif
582 582
583 return CommonNavigationParams( 583 return CommonNavigationParams(
584 dest_url, dest_referrer, GetTransitionType(), navigation_type, 584 dest_url, dest_referrer, GetTransitionType(), navigation_type,
585 !IsViewSourceMode(), should_replace_entry(), ui_timestamp, report_type, 585 !IsViewSourceMode(), should_replace_entry(), ui_timestamp, report_type,
586 GetBaseURLForDataURL(), GetHistoryURLForDataURL(), lofi_state, 586 GetBaseURLForDataURL(), GetHistoryURLForDataURL(), lofi_state,
587 navigation_start); 587 navigation_start, GetHasPostData() ? "POST" : "GET");
588 } 588 }
589 589
590 StartNavigationParams NavigationEntryImpl::ConstructStartNavigationParams() 590 StartNavigationParams NavigationEntryImpl::ConstructStartNavigationParams()
591 const { 591 const {
592 std::vector<unsigned char> browser_initiated_post_data; 592 std::vector<unsigned char> browser_initiated_post_data;
593 if (GetBrowserInitiatedPostData()) { 593 if (GetBrowserInitiatedPostData()) {
594 browser_initiated_post_data.assign( 594 browser_initiated_post_data.assign(
595 GetBrowserInitiatedPostData()->front(), 595 GetBrowserInitiatedPostData()->front(),
596 GetBrowserInitiatedPostData()->front() + 596 GetBrowserInitiatedPostData()->front() +
597 GetBrowserInitiatedPostData()->size()); 597 GetBrowserInitiatedPostData()->size());
598 } 598 }
599 599
600 return StartNavigationParams(GetHasPostData(), extra_headers(), 600 return StartNavigationParams(extra_headers(), browser_initiated_post_data,
601 browser_initiated_post_data,
602 #if defined(OS_ANDROID) 601 #if defined(OS_ANDROID)
603 has_user_gesture(), 602 has_user_gesture(),
604 #endif 603 #endif
605 transferred_global_request_id().child_id, 604 transferred_global_request_id().child_id,
606 transferred_global_request_id().request_id); 605 transferred_global_request_id().request_id);
607 } 606 }
608 607
609 RequestNavigationParams NavigationEntryImpl::ConstructRequestNavigationParams( 608 RequestNavigationParams NavigationEntryImpl::ConstructRequestNavigationParams(
610 const FrameNavigationEntry& frame_entry, 609 const FrameNavigationEntry& frame_entry,
611 bool is_same_document_history_load, 610 bool is_same_document_history_load,
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
771 return node; 770 return node;
772 } 771 }
773 // Enqueue any children and keep looking. 772 // Enqueue any children and keep looking.
774 for (auto& child : node->children) 773 for (auto& child : node->children)
775 work_queue.push(child); 774 work_queue.push(child);
776 } 775 }
777 return nullptr; 776 return nullptr;
778 } 777 }
779 778
780 } // namespace content 779 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/browser_side_navigation_browsertest.cc ('k') | content/browser/frame_host/navigation_request.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698