| 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 384 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 395 int current_history_list_length = controller->GetEntryCount(); | 395 int current_history_list_length = controller->GetEntryCount(); |
| 396 if (should_clear_history_list()) { | 396 if (should_clear_history_list()) { |
| 397 // Set the history list related parameters to the same values a | 397 // Set the history list related parameters to the same values a |
| 398 // NavigationController would return before its first navigation. This will | 398 // NavigationController would return before its first navigation. This will |
| 399 // fully clear the RenderView's view of the session history. | 399 // fully clear the RenderView's view of the session history. |
| 400 pending_history_list_offset = -1; | 400 pending_history_list_offset = -1; |
| 401 current_history_list_offset = -1; | 401 current_history_list_offset = -1; |
| 402 current_history_list_length = 0; | 402 current_history_list_length = 0; |
| 403 } | 403 } |
| 404 return HistoryNavigationParams( | 404 return HistoryNavigationParams( |
| 405 GetPageState(), GetPageID(), pending_history_list_offset, | 405 GetPageState(), GetPageID(), GetUniqueID(), pending_history_list_offset, |
| 406 current_history_list_offset, current_history_list_length, | 406 current_history_list_offset, current_history_list_length, |
| 407 should_clear_history_list()); | 407 should_clear_history_list()); |
| 408 } | 408 } |
| 409 | 409 |
| 410 StartNavigationParams NavigationEntryImpl::ConstructStartNavigationParams() | 410 StartNavigationParams NavigationEntryImpl::ConstructStartNavigationParams() |
| 411 const { | 411 const { |
| 412 std::vector<unsigned char> browser_initiated_post_data; | 412 std::vector<unsigned char> browser_initiated_post_data; |
| 413 if (GetBrowserInitiatedPostData()) { | 413 if (GetBrowserInitiatedPostData()) { |
| 414 browser_initiated_post_data.assign( | 414 browser_initiated_post_data.assign( |
| 415 GetBrowserInitiatedPostData()->front(), | 415 GetBrowserInitiatedPostData()->front(), |
| 416 GetBrowserInitiatedPostData()->front() + | 416 GetBrowserInitiatedPostData()->front() + |
| 417 GetBrowserInitiatedPostData()->size()); | 417 GetBrowserInitiatedPostData()->size()); |
| 418 } | 418 } |
| 419 | 419 |
| 420 return StartNavigationParams( | 420 return StartNavigationParams( |
| 421 GetHasPostData(), extra_headers(), browser_initiated_post_data, | 421 GetHasPostData(), extra_headers(), browser_initiated_post_data, |
| 422 should_replace_entry(), transferred_global_request_id().child_id, | 422 should_replace_entry(), transferred_global_request_id().child_id, |
| 423 transferred_global_request_id().request_id); | 423 transferred_global_request_id().request_id); |
| 424 } | 424 } |
| 425 | 425 |
| 426 } // namespace content | 426 } // namespace content |
| OLD | NEW |