| OLD | NEW |
| 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 "base/metrics/histogram.h" | 7 #include "base/metrics/histogram.h" |
| 8 #include "base/strings/string_util.h" | 8 #include "base/strings/string_util.h" |
| 9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
| 10 #include "content/browser/frame_host/navigation_controller_impl.h" | 10 #include "content/browser/frame_host/navigation_controller_impl.h" |
| (...skipping 429 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 440 int current_history_list_length = controller->GetEntryCount(); | 440 int current_history_list_length = controller->GetEntryCount(); |
| 441 if (should_clear_history_list()) { | 441 if (should_clear_history_list()) { |
| 442 // Set the history list related parameters to the same values a | 442 // Set the history list related parameters to the same values a |
| 443 // NavigationController would return before its first navigation. This will | 443 // NavigationController would return before its first navigation. This will |
| 444 // fully clear the RenderView's view of the session history. | 444 // fully clear the RenderView's view of the session history. |
| 445 pending_history_list_offset = -1; | 445 pending_history_list_offset = -1; |
| 446 current_history_list_offset = -1; | 446 current_history_list_offset = -1; |
| 447 current_history_list_length = 0; | 447 current_history_list_length = 0; |
| 448 } | 448 } |
| 449 return HistoryNavigationParams( | 449 return HistoryNavigationParams( |
| 450 GetPageState(), GetPageID(), pending_history_list_offset, | 450 GetPageState(), GetPageID(), GetUniqueID(), pending_history_list_offset, |
| 451 current_history_list_offset, current_history_list_length, | 451 current_history_list_offset, current_history_list_length, |
| 452 should_clear_history_list()); | 452 should_clear_history_list()); |
| 453 } | 453 } |
| 454 | 454 |
| 455 StartNavigationParams NavigationEntryImpl::ConstructStartNavigationParams() | 455 StartNavigationParams NavigationEntryImpl::ConstructStartNavigationParams() |
| 456 const { | 456 const { |
| 457 std::vector<unsigned char> browser_initiated_post_data; | 457 std::vector<unsigned char> browser_initiated_post_data; |
| 458 if (GetBrowserInitiatedPostData()) { | 458 if (GetBrowserInitiatedPostData()) { |
| 459 browser_initiated_post_data.assign( | 459 browser_initiated_post_data.assign( |
| 460 GetBrowserInitiatedPostData()->front(), | 460 GetBrowserInitiatedPostData()->front(), |
| 461 GetBrowserInitiatedPostData()->front() + | 461 GetBrowserInitiatedPostData()->front() + |
| 462 GetBrowserInitiatedPostData()->size()); | 462 GetBrowserInitiatedPostData()->size()); |
| 463 } | 463 } |
| 464 | 464 |
| 465 return StartNavigationParams( | 465 return StartNavigationParams( |
| 466 GetHasPostData(), extra_headers(), browser_initiated_post_data, | 466 GetHasPostData(), extra_headers(), browser_initiated_post_data, |
| 467 should_replace_entry(), transferred_global_request_id().child_id, | 467 should_replace_entry(), transferred_global_request_id().child_id, |
| 468 transferred_global_request_id().request_id); | 468 transferred_global_request_id().request_id); |
| 469 } | 469 } |
| 470 | 470 |
| 471 } // namespace content | 471 } // namespace content |
| OLD | NEW |