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

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

Issue 2368183004: Move redirect_chain from NavigationEntry to FrameNavigationEntry. (Closed)
Patch Set: Created 4 years, 2 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/browser/frame_host/frame_navigation_entry.h" 5 #include "content/browser/frame_host/frame_navigation_entry.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "content/common/page_state_serialization.h" 9 #include "content/common/page_state_serialization.h"
10 #include "content/common/site_isolation_policy.h" 10 #include "content/common/site_isolation_policy.h"
(...skipping 25 matching lines...) Expand all
36 36
37 FrameNavigationEntry::~FrameNavigationEntry() { 37 FrameNavigationEntry::~FrameNavigationEntry() {
38 } 38 }
39 39
40 FrameNavigationEntry* FrameNavigationEntry::Clone() const { 40 FrameNavigationEntry* FrameNavigationEntry::Clone() const {
41 FrameNavigationEntry* copy = new FrameNavigationEntry(); 41 FrameNavigationEntry* copy = new FrameNavigationEntry();
42 42
43 // Omit any fields cleared at commit time. 43 // Omit any fields cleared at commit time.
44 copy->UpdateEntry(frame_unique_name_, item_sequence_number_, 44 copy->UpdateEntry(frame_unique_name_, item_sequence_number_,
45 document_sequence_number_, site_instance_.get(), nullptr, 45 document_sequence_number_, site_instance_.get(), nullptr,
46 url_, referrer_, page_state_, method_, post_id_); 46 redirect_chain_, url_, referrer_, page_state_, method_,
47 post_id_);
47 return copy; 48 return copy;
48 } 49 }
49 50
50 void FrameNavigationEntry::UpdateEntry( 51 void FrameNavigationEntry::UpdateEntry(
51 const std::string& frame_unique_name, 52 const std::string& frame_unique_name,
52 int64_t item_sequence_number, 53 int64_t item_sequence_number,
53 int64_t document_sequence_number, 54 int64_t document_sequence_number,
54 SiteInstanceImpl* site_instance, 55 SiteInstanceImpl* site_instance,
55 scoped_refptr<SiteInstanceImpl> source_site_instance, 56 scoped_refptr<SiteInstanceImpl> source_site_instance,
57 const std::vector<GURL>& redirect_chain,
56 const GURL& url, 58 const GURL& url,
57 const Referrer& referrer, 59 const Referrer& referrer,
58 const PageState& page_state, 60 const PageState& page_state,
59 const std::string& method, 61 const std::string& method,
60 int64_t post_id) { 62 int64_t post_id) {
61 frame_unique_name_ = frame_unique_name; 63 frame_unique_name_ = frame_unique_name;
62 item_sequence_number_ = item_sequence_number; 64 item_sequence_number_ = item_sequence_number;
63 document_sequence_number_ = document_sequence_number; 65 document_sequence_number_ = document_sequence_number;
64 site_instance_ = site_instance; 66 site_instance_ = site_instance;
65 source_site_instance_ = std::move(source_site_instance); 67 source_site_instance_ = std::move(source_site_instance);
68 redirect_chain_ = redirect_chain;
66 url_ = url; 69 url_ = url;
67 referrer_ = referrer; 70 referrer_ = referrer;
68 page_state_ = page_state; 71 page_state_ = page_state;
69 method_ = method; 72 method_ = method;
70 post_id_ = post_id; 73 post_id_ = post_id;
71 } 74 }
72 75
73 void FrameNavigationEntry::set_item_sequence_number( 76 void FrameNavigationEntry::set_item_sequence_number(
74 int64_t item_sequence_number) { 77 int64_t item_sequence_number) {
75 // TODO(creis): Assert that this does not change after being assigned, once 78 // TODO(creis): Assert that this does not change after being assigned, once
(...skipping 26 matching lines...) Expand all
102 105
103 // Generate the body from the PageState. 106 // Generate the body from the PageState.
104 ExplodedPageState exploded_state; 107 ExplodedPageState exploded_state;
105 if (!DecodePageState(page_state_.ToEncodedData(), &exploded_state)) 108 if (!DecodePageState(page_state_.ToEncodedData(), &exploded_state))
106 return nullptr; 109 return nullptr;
107 110
108 return exploded_state.top.http_body.request_body; 111 return exploded_state.top.http_body.request_body;
109 } 112 }
110 113
111 } // namespace content 114 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698