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

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

Issue 2038813003: Making ResourceRequestBody part of //content's public API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebasing... Created 4 years, 6 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 #include <utility> 10 #include <utility>
11 11
12 #include "base/memory/ptr_util.h" 12 #include "base/memory/ptr_util.h"
13 #include "base/metrics/histogram.h" 13 #include "base/metrics/histogram.h"
14 #include "base/strings/string_util.h" 14 #include "base/strings/string_util.h"
15 #include "base/strings/utf_string_conversions.h" 15 #include "base/strings/utf_string_conversions.h"
16 #include "build/build_config.h" 16 #include "build/build_config.h"
17 #include "components/url_formatter/url_formatter.h" 17 #include "components/url_formatter/url_formatter.h"
18 #include "content/common/content_constants_internal.h" 18 #include "content/common/content_constants_internal.h"
19 #include "content/common/navigation_params.h" 19 #include "content/common/navigation_params.h"
20 #include "content/common/page_state_serialization.h" 20 #include "content/common/page_state_serialization.h"
21 #include "content/common/resource_request_body.h" 21 #include "content/common/resource_request_body_impl.h"
22 #include "content/common/site_isolation_policy.h" 22 #include "content/common/site_isolation_policy.h"
23 #include "content/public/common/browser_side_navigation_policy.h" 23 #include "content/public/common/browser_side_navigation_policy.h"
24 #include "content/public/common/content_constants.h" 24 #include "content/public/common/content_constants.h"
25 #include "content/public/common/url_constants.h" 25 #include "content/public/common/url_constants.h"
26 #include "ui/gfx/text_elider.h" 26 #include "ui/gfx/text_elider.h"
27 27
28 using base::UTF16ToUTF8; 28 using base::UTF16ToUTF8;
29 29
30 namespace content { 30 namespace content {
31 31
(...skipping 531 matching lines...) Expand 10 before | Expand all | Expand 10 after
563 // ResetForCommit: should_replace_entry_ 563 // ResetForCommit: should_replace_entry_
564 copy->redirect_chain_ = redirect_chain_; 564 copy->redirect_chain_ = redirect_chain_;
565 // ResetForCommit: should_clear_history_list_ 565 // ResetForCommit: should_clear_history_list_
566 // ResetForCommit: frame_tree_node_id_ 566 // ResetForCommit: frame_tree_node_id_
567 // ResetForCommit: intent_received_timestamp_ 567 // ResetForCommit: intent_received_timestamp_
568 copy->extra_data_ = extra_data_; 568 copy->extra_data_ = extra_data_;
569 569
570 return copy; 570 return copy;
571 } 571 }
572 572
573 scoped_refptr<ResourceRequestBody> 573 scoped_refptr<ResourceRequestBodyImpl>
574 NavigationEntryImpl::ConstructBodyFromBrowserInitiatedPostData() const { 574 NavigationEntryImpl::ConstructBodyFromBrowserInitiatedPostData() const {
575 scoped_refptr<ResourceRequestBody> browser_initiated_post_body; 575 scoped_refptr<ResourceRequestBodyImpl> browser_initiated_post_body;
576 if (GetHasPostData()) { 576 if (GetHasPostData()) {
577 if (const base::RefCountedMemory* memory = GetBrowserInitiatedPostData()) { 577 if (const base::RefCountedMemory* memory = GetBrowserInitiatedPostData()) {
578 browser_initiated_post_body = new ResourceRequestBody(); 578 browser_initiated_post_body = new ResourceRequestBodyImpl();
579 browser_initiated_post_body->AppendBytes(memory->front_as<char>(), 579 browser_initiated_post_body->AppendBytes(memory->front_as<char>(),
580 memory->size()); 580 memory->size());
581 } 581 }
582 } 582 }
583 return browser_initiated_post_body; 583 return browser_initiated_post_body;
584 } 584 }
585 585
586 CommonNavigationParams NavigationEntryImpl::ConstructCommonNavigationParams( 586 CommonNavigationParams NavigationEntryImpl::ConstructCommonNavigationParams(
587 const FrameNavigationEntry& frame_entry, 587 const FrameNavigationEntry& frame_entry,
588 const scoped_refptr<ResourceRequestBody>& post_body, 588 const scoped_refptr<ResourceRequestBodyImpl>& post_body,
589 const GURL& dest_url, 589 const GURL& dest_url,
590 const Referrer& dest_referrer, 590 const Referrer& dest_referrer,
591 FrameMsg_Navigate_Type::Value navigation_type, 591 FrameMsg_Navigate_Type::Value navigation_type,
592 LoFiState lofi_state, 592 LoFiState lofi_state,
593 const base::TimeTicks& navigation_start) const { 593 const base::TimeTicks& navigation_start) const {
594 FrameMsg_UILoadMetricsReportType::Value report_type = 594 FrameMsg_UILoadMetricsReportType::Value report_type =
595 FrameMsg_UILoadMetricsReportType::NO_REPORT; 595 FrameMsg_UILoadMetricsReportType::NO_REPORT;
596 base::TimeTicks ui_timestamp = base::TimeTicks(); 596 base::TimeTicks ui_timestamp = base::TimeTicks();
597 #if defined(OS_ANDROID) 597 #if defined(OS_ANDROID)
598 if (!intent_received_timestamp().is_null()) 598 if (!intent_received_timestamp().is_null())
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
777 return node; 777 return node;
778 778
779 // Enqueue any children and keep looking. 779 // Enqueue any children and keep looking.
780 for (auto& child : node->children) 780 for (auto& child : node->children)
781 work_queue.push(child); 781 work_queue.push(child);
782 } 782 }
783 return nullptr; 783 return nullptr;
784 } 784 }
785 785
786 } // namespace content 786 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/frame_host/navigation_entry_impl.h ('k') | content/browser/frame_host/navigation_handle_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698