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_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/debug/trace_event.h" | 8 #include "base/debug/trace_event.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/strings/string_number_conversions.h" // Temporary | 10 #include "base/strings/string_number_conversions.h" // Temporary |
(...skipping 1298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1309 last_committed_entry_index_ = GetEntryCount() - 1; | 1309 last_committed_entry_index_ = GetEntryCount() - 1; |
1310 | 1310 |
1311 delegate_->SetHistoryLengthAndPrune(site_instance.get(), | 1311 delegate_->SetHistoryLengthAndPrune(site_instance.get(), |
1312 max_source_index, | 1312 max_source_index, |
1313 minimum_page_id); | 1313 minimum_page_id); |
1314 | 1314 |
1315 // Copy the max page id map from the old tab to the new tab. This ensures | 1315 // Copy the max page id map from the old tab to the new tab. This ensures |
1316 // that new and existing navigations in the tab's current SiteInstances | 1316 // that new and existing navigations in the tab's current SiteInstances |
1317 // are identified properly. | 1317 // are identified properly. |
1318 delegate_->CopyMaxPageIDsFrom(source->delegate()->GetWebContents()); | 1318 delegate_->CopyMaxPageIDsFrom(source->delegate()->GetWebContents()); |
| 1319 max_restored_page_id_ = source->max_restored_page_id_; |
1319 | 1320 |
1320 // If there is a last committed entry, be sure to include it in the new | 1321 // If there is a last committed entry, be sure to include it in the new |
1321 // max page ID map. | 1322 // max page ID map. |
1322 if (max_page_id > -1) { | 1323 if (max_page_id > -1) { |
1323 delegate_->UpdateMaxPageIDForSiteInstance(site_instance.get(), | 1324 delegate_->UpdateMaxPageIDForSiteInstance(site_instance.get(), |
1324 max_page_id); | 1325 max_page_id); |
1325 } | 1326 } |
1326 } | 1327 } |
1327 | 1328 |
1328 bool NavigationControllerImpl::CanPruneAllButLastCommitted() { | 1329 bool NavigationControllerImpl::CanPruneAllButLastCommitted() { |
(...skipping 414 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1743 } | 1744 } |
1744 } | 1745 } |
1745 } | 1746 } |
1746 | 1747 |
1747 void NavigationControllerImpl::SetGetTimestampCallbackForTest( | 1748 void NavigationControllerImpl::SetGetTimestampCallbackForTest( |
1748 const base::Callback<base::Time()>& get_timestamp_callback) { | 1749 const base::Callback<base::Time()>& get_timestamp_callback) { |
1749 get_timestamp_callback_ = get_timestamp_callback; | 1750 get_timestamp_callback_ = get_timestamp_callback; |
1750 } | 1751 } |
1751 | 1752 |
1752 } // namespace content | 1753 } // namespace content |
OLD | NEW |