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/common/navigation_params.h" | 10 #include "content/common/navigation_params.h" |
(...skipping 427 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
438 // Set the history list related parameters to the same values a | 438 // Set the history list related parameters to the same values a |
439 // NavigationController would return before its first navigation. This will | 439 // NavigationController would return before its first navigation. This will |
440 // fully clear the RenderView's view of the session history. | 440 // fully clear the RenderView's view of the session history. |
441 pending_offset_to_send = -1; | 441 pending_offset_to_send = -1; |
442 current_offset_to_send = -1; | 442 current_offset_to_send = -1; |
443 current_length_to_send = 0; | 443 current_length_to_send = 0; |
444 } | 444 } |
445 return RequestNavigationParams( | 445 return RequestNavigationParams( |
446 GetIsOverridingUserAgent(), navigation_start, redirects, | 446 GetIsOverridingUserAgent(), navigation_start, redirects, |
447 GetCanLoadLocalResources(), GetFrameToNavigate(), base::Time::Now(), | 447 GetCanLoadLocalResources(), GetFrameToNavigate(), base::Time::Now(), |
448 GetPageState(), GetPageID(), pending_offset_to_send, | 448 GetPageState(), GetPageID(), GetUniqueID(), pending_offset_to_send, |
449 current_offset_to_send, current_length_to_send, | 449 current_offset_to_send, current_length_to_send, |
450 should_clear_history_list()); | 450 should_clear_history_list()); |
451 } | 451 } |
452 | 452 |
453 void NavigationEntryImpl::ResetForCommit() { | 453 void NavigationEntryImpl::ResetForCommit() { |
454 // Any state that only matters when a navigation entry is pending should be | 454 // Any state that only matters when a navigation entry is pending should be |
455 // cleared here. | 455 // cleared here. |
456 // TODO(creis): This state should be moved to NavigationRequest once | 456 // TODO(creis): This state should be moved to NavigationRequest once |
457 // PlzNavigate is enabled. | 457 // PlzNavigate is enabled. |
458 SetBrowserInitiatedPostData(nullptr); | 458 SetBrowserInitiatedPostData(nullptr); |
(...skipping 29 matching lines...) Expand all Loading... |
488 screenshot_ = png_data; | 488 screenshot_ = png_data; |
489 if (screenshot_.get()) | 489 if (screenshot_.get()) |
490 UMA_HISTOGRAM_MEMORY_KB("Overscroll.ScreenshotSize", screenshot_->size()); | 490 UMA_HISTOGRAM_MEMORY_KB("Overscroll.ScreenshotSize", screenshot_->size()); |
491 } | 491 } |
492 | 492 |
493 GURL NavigationEntryImpl::GetHistoryURLForDataURL() const { | 493 GURL NavigationEntryImpl::GetHistoryURLForDataURL() const { |
494 return GetBaseURLForDataURL().is_empty() ? GURL() : GetVirtualURL(); | 494 return GetBaseURLForDataURL().is_empty() ? GURL() : GetVirtualURL(); |
495 } | 495 } |
496 | 496 |
497 } // namespace content | 497 } // namespace content |
OLD | NEW |