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

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

Issue 1956383003: Forwarding POST body into renderer after a cross-site transfer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Extracted a shared NavigationEntryImpl::ConstructResourceRequestBody. Created 4 years, 7 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 #ifndef CONTENT_BROWSER_FRAME_HOST_NAVIGATION_ENTRY_IMPL_H_ 5 #ifndef CONTENT_BROWSER_FRAME_HOST_NAVIGATION_ENTRY_IMPL_H_
6 #define CONTENT_BROWSER_FRAME_HOST_NAVIGATION_ENTRY_IMPL_H_ 6 #define CONTENT_BROWSER_FRAME_HOST_NAVIGATION_ENTRY_IMPL_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
11 #include "base/memory/ref_counted.h" 11 #include "base/memory/ref_counted.h"
12 #include "base/memory/scoped_vector.h" 12 #include "base/memory/scoped_vector.h"
13 #include "base/time/time.h" 13 #include "base/time/time.h"
14 #include "build/build_config.h" 14 #include "build/build_config.h"
15 #include "content/browser/frame_host/frame_navigation_entry.h" 15 #include "content/browser/frame_host/frame_navigation_entry.h"
16 #include "content/browser/frame_host/frame_tree_node.h" 16 #include "content/browser/frame_host/frame_tree_node.h"
17 #include "content/browser/site_instance_impl.h" 17 #include "content/browser/site_instance_impl.h"
18 #include "content/common/frame_message_enums.h" 18 #include "content/common/frame_message_enums.h"
19 #include "content/public/browser/favicon_status.h" 19 #include "content/public/browser/favicon_status.h"
20 #include "content/public/browser/global_request_id.h" 20 #include "content/public/browser/global_request_id.h"
21 #include "content/public/browser/navigation_entry.h" 21 #include "content/public/browser/navigation_entry.h"
22 #include "content/public/common/page_state.h" 22 #include "content/public/common/page_state.h"
23 #include "content/public/common/ssl_status.h" 23 #include "content/public/common/ssl_status.h"
24 24
25 namespace content { 25 namespace content {
26 class ResourceRequestBody;
26 struct CommonNavigationParams; 27 struct CommonNavigationParams;
27 struct RequestNavigationParams; 28 struct RequestNavigationParams;
28 struct StartNavigationParams; 29 struct StartNavigationParams;
29 30
30 class CONTENT_EXPORT NavigationEntryImpl 31 class CONTENT_EXPORT NavigationEntryImpl
31 : public NON_EXPORTED_BASE(NavigationEntry) { 32 : public NON_EXPORTED_BASE(NavigationEntry) {
32 public: 33 public:
33 // Represents a tree of FrameNavigationEntries that make up this joint session 34 // Represents a tree of FrameNavigationEntries that make up this joint session
34 // history item. The tree currently only tracks the main frame by default, 35 // history item. The tree currently only tracks the main frame by default,
35 // and is populated with subframe nodes in --site-per-process mode. 36 // and is populated with subframe nodes in --site-per-process mode.
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 // TODO(creis): Once we start sharing FrameNavigationEntries between 153 // TODO(creis): Once we start sharing FrameNavigationEntries between
153 // NavigationEntryImpls, we will need to support two versions of Clone: one 154 // NavigationEntryImpls, we will need to support two versions of Clone: one
154 // that shares the existing FrameNavigationEntries (for use within the same 155 // that shares the existing FrameNavigationEntries (for use within the same
155 // tab) and one that draws them from a different pool (for use in a new tab). 156 // tab) and one that draws them from a different pool (for use in a new tab).
156 std::unique_ptr<NavigationEntryImpl> CloneAndReplace( 157 std::unique_ptr<NavigationEntryImpl> CloneAndReplace(
157 FrameTreeNode* frame_tree_node, 158 FrameTreeNode* frame_tree_node,
158 FrameNavigationEntry* frame_entry) const; 159 FrameNavigationEntry* frame_entry) const;
159 160
160 // Helper functions to construct NavigationParameters for a navigation to this 161 // Helper functions to construct NavigationParameters for a navigation to this
161 // NavigationEntry. 162 // NavigationEntry.
163 scoped_refptr<ResourceRequestBody> ConstructResourceRequestBody() const;
clamy 2016/05/19 16:08:00 Could we make it clearer that this is creating the
Łukasz Anforowicz 2016/05/19 18:06:58 Thanks for the feedback. I also wondered about th
clamy 2016/05/20 15:49:14 ConstructBodyFromBrowserInitiatedPostData sounds t
Łukasz Anforowicz 2016/05/20 22:18:47 Acknowledged. (the rename already happened in a p
162 CommonNavigationParams ConstructCommonNavigationParams( 164 CommonNavigationParams ConstructCommonNavigationParams(
165 const std::string& method,
163 const GURL& dest_url, 166 const GURL& dest_url,
164 const Referrer& dest_referrer, 167 const Referrer& dest_referrer,
165 FrameMsg_Navigate_Type::Value navigation_type, 168 FrameMsg_Navigate_Type::Value navigation_type,
166 LoFiState lofi_state, 169 LoFiState lofi_state,
167 const base::TimeTicks& navigation_start) const; 170 const base::TimeTicks& navigation_start) const;
168 StartNavigationParams ConstructStartNavigationParams() const; 171 StartNavigationParams ConstructStartNavigationParams(
172 const scoped_refptr<ResourceRequestBody>& post_body) const;
169 RequestNavigationParams ConstructRequestNavigationParams( 173 RequestNavigationParams ConstructRequestNavigationParams(
170 const FrameNavigationEntry& frame_entry, 174 const FrameNavigationEntry& frame_entry,
171 bool is_same_document_history_load, 175 bool is_same_document_history_load,
172 bool has_committed_real_load, 176 bool has_committed_real_load,
173 bool intended_as_new_entry, 177 bool intended_as_new_entry,
174 int pending_offset_to_send, 178 int pending_offset_to_send,
175 int current_offset_to_send, 179 int current_offset_to_send,
176 int current_length_to_send) const; 180 int current_length_to_send) const;
177 181
178 // Once a navigation entry is committed, we should no longer track several 182 // Once a navigation entry is committed, we should no longer track several
(...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after
502 // persisted, unless specific data is taken out/put back in at save/restore 506 // persisted, unless specific data is taken out/put back in at save/restore
503 // time (see TabNavigation for an example of this). 507 // time (see TabNavigation for an example of this).
504 std::map<std::string, base::string16> extra_data_; 508 std::map<std::string, base::string16> extra_data_;
505 509
506 DISALLOW_COPY_AND_ASSIGN(NavigationEntryImpl); 510 DISALLOW_COPY_AND_ASSIGN(NavigationEntryImpl);
507 }; 511 };
508 512
509 } // namespace content 513 } // namespace content
510 514
511 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATION_ENTRY_IMPL_H_ 515 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATION_ENTRY_IMPL_H_
OLDNEW
« no previous file with comments | « no previous file | content/browser/frame_host/navigation_entry_impl.cc » ('j') | content/browser/frame_host/navigation_request.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698