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

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

Issue 306033002: Update post state on navigation within page. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix test in debug Created 6 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | content/browser/frame_host/navigation_controller_impl_unittest.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 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_controller_impl.h" 5 #include "content/browser/frame_host/navigation_controller_impl.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/debug/trace_event.h" 9 #include "base/debug/trace_event.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 1150 matching lines...) Expand 10 before | Expand all | Expand 10 after
1161 rfh->GetSiteInstance(), params.page_id); 1161 rfh->GetSiteInstance(), params.page_id);
1162 1162
1163 // Reference fragment navigation. We're guaranteed to have the last_committed 1163 // Reference fragment navigation. We're guaranteed to have the last_committed
1164 // entry and it will be the same page as the new navigation (minus the 1164 // entry and it will be the same page as the new navigation (minus the
1165 // reference fragments, of course). We'll update the URL of the existing 1165 // reference fragments, of course). We'll update the URL of the existing
1166 // entry without pruning the forward history. 1166 // entry without pruning the forward history.
1167 existing_entry->SetURL(params.url); 1167 existing_entry->SetURL(params.url);
1168 if (existing_entry->update_virtual_url_with_url()) 1168 if (existing_entry->update_virtual_url_with_url())
1169 UpdateVirtualURLToURL(existing_entry, params.url); 1169 UpdateVirtualURLToURL(existing_entry, params.url);
1170 1170
1171 existing_entry->SetHasPostData(params.is_post);
1172 existing_entry->SetPostID(params.post_id);
1173
1171 // This replaces the existing entry since the page ID didn't change. 1174 // This replaces the existing entry since the page ID didn't change.
1172 *did_replace_entry = true; 1175 *did_replace_entry = true;
1173 1176
1174 DiscardNonCommittedEntriesInternal(); 1177 DiscardNonCommittedEntriesInternal();
1175 1178
1176 // If a transient entry was removed, the indices might have changed, so we 1179 // If a transient entry was removed, the indices might have changed, so we
1177 // have to query the entry index again. 1180 // have to query the entry index again.
1178 last_committed_entry_index_ = 1181 last_committed_entry_index_ =
1179 GetEntryIndexWithPageID(rfh->GetSiteInstance(), params.page_id); 1182 GetEntryIndexWithPageID(rfh->GetSiteInstance(), params.page_id);
1180 } 1183 }
(...skipping 580 matching lines...) Expand 10 before | Expand all | Expand 10 after
1761 } 1764 }
1762 } 1765 }
1763 } 1766 }
1764 1767
1765 void NavigationControllerImpl::SetGetTimestampCallbackForTest( 1768 void NavigationControllerImpl::SetGetTimestampCallbackForTest(
1766 const base::Callback<base::Time()>& get_timestamp_callback) { 1769 const base::Callback<base::Time()>& get_timestamp_callback) {
1767 get_timestamp_callback_ = get_timestamp_callback; 1770 get_timestamp_callback_ = get_timestamp_callback;
1768 } 1771 }
1769 1772
1770 } // namespace content 1773 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/browser/frame_host/navigation_controller_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698