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

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

Issue 1907443006: PlzNavigate: store POST data in the FrameNavigationEntry (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase + addressed comments 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
« no previous file with comments | « no previous file | content/browser/frame_host/frame_navigation_entry.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #ifndef CONTENT_BROWSER_FRAME_HOST_FRAME_NAVIGATION_ENTRY_H_ 5 #ifndef CONTENT_BROWSER_FRAME_HOST_FRAME_NAVIGATION_ENTRY_H_
6 #define CONTENT_BROWSER_FRAME_HOST_FRAME_NAVIGATION_ENTRY_H_ 6 #define CONTENT_BROWSER_FRAME_HOST_FRAME_NAVIGATION_ENTRY_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 "content/browser/site_instance_impl.h" 12 #include "content/browser/site_instance_impl.h"
13 #include "content/common/resource_request_body.h"
13 #include "content/public/common/page_state.h" 14 #include "content/public/common/page_state.h"
14 #include "content/public/common/referrer.h" 15 #include "content/public/common/referrer.h"
15 16
16 namespace content { 17 namespace content {
17 18
18 // Represents a session history item for a particular frame. It is matched with 19 // Represents a session history item for a particular frame. It is matched with
19 // corresponding FrameTreeNodes using unique name (or by the root position). 20 // corresponding FrameTreeNodes using unique name (or by the root position).
20 // 21 //
21 // This class is refcounted and can be shared across multiple NavigationEntries. 22 // This class is refcounted and can be shared across multiple NavigationEntries.
22 // For now, it is owned by a single NavigationEntry and only tracks the main 23 // For now, it is owned by a single NavigationEntry and only tracks the main
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 115
115 // The HTTP method used to navigate. 116 // The HTTP method used to navigate.
116 const std::string& method() const { return method_; } 117 const std::string& method() const { return method_; }
117 void set_method(const std::string& method) { method_ = method; } 118 void set_method(const std::string& method) { method_ = method; }
118 119
119 // The id of the post corresponding to this navigation or -1 if the 120 // The id of the post corresponding to this navigation or -1 if the
120 // navigation was not a POST. 121 // navigation was not a POST.
121 int64_t post_id() const { return post_id_; } 122 int64_t post_id() const { return post_id_; }
122 void set_post_id(int64_t post_id) { post_id_ = post_id; } 123 void set_post_id(int64_t post_id) { post_id_ = post_id; }
123 124
125 // The data sent during a POST navigation. Returns nullptr if the navigation
126 // is not a POST.
127 scoped_refptr<ResourceRequestBody> GetPostData() const;
128
124 private: 129 private:
125 friend class base::RefCounted<FrameNavigationEntry>; 130 friend class base::RefCounted<FrameNavigationEntry>;
126 virtual ~FrameNavigationEntry(); 131 virtual ~FrameNavigationEntry();
127 132
128 // WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING 133 // WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
129 // Add all new fields to |UpdateEntry|. 134 // Add all new fields to |UpdateEntry|.
130 // TODO(creis): These fields have implications for session restore. This is 135 // TODO(creis): These fields have implications for session restore. This is
131 // currently managed by NavigationEntry, but the logic will move here. 136 // currently managed by NavigationEntry, but the logic will move here.
132 // WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING 137 // WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
133 138
(...skipping 10 matching lines...) Expand all
144 PageState page_state_; 149 PageState page_state_;
145 std::string method_; 150 std::string method_;
146 int64_t post_id_; 151 int64_t post_id_;
147 152
148 DISALLOW_COPY_AND_ASSIGN(FrameNavigationEntry); 153 DISALLOW_COPY_AND_ASSIGN(FrameNavigationEntry);
149 }; 154 };
150 155
151 } // namespace content 156 } // namespace content
152 157
153 #endif // CONTENT_BROWSER_FRAME_HOST_FRAME_NAVIGATION_ENTRY_H_ 158 #endif // CONTENT_BROWSER_FRAME_HOST_FRAME_NAVIGATION_ENTRY_H_
OLDNEW
« no previous file with comments | « no previous file | content/browser/frame_host/frame_navigation_entry.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698