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 /* | 5 /* |
6 * Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. | 6 * Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. |
7 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) | 7 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) |
8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. | 8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. |
9 * (http://www.torchmobile.com/) | 9 * (http://www.torchmobile.com/) |
10 * | 10 * |
(...skipping 1829 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1840 FrameLoadVector* different_document_loads) { | 1840 FrameLoadVector* different_document_loads) { |
1841 DCHECK(pending_entry_); | 1841 DCHECK(pending_entry_); |
1842 DCHECK_GE(last_committed_entry_index_, 0); | 1842 DCHECK_GE(last_committed_entry_index_, 0); |
1843 FrameNavigationEntry* new_item = pending_entry_->GetFrameEntry(frame); | 1843 FrameNavigationEntry* new_item = pending_entry_->GetFrameEntry(frame); |
1844 FrameNavigationEntry* old_item = | 1844 FrameNavigationEntry* old_item = |
1845 GetLastCommittedEntry()->GetFrameEntry(frame); | 1845 GetLastCommittedEntry()->GetFrameEntry(frame); |
1846 if (!new_item) | 1846 if (!new_item) |
1847 return; | 1847 return; |
1848 | 1848 |
1849 // Schedule a load in this frame if the new item isn't for the same item | 1849 // Schedule a load in this frame if the new item isn't for the same item |
1850 // sequence number in the same SiteInstance. | 1850 // sequence number in the same SiteInstance. Newly restored items may not have |
1851 // TODO(creis): Handle null SiteInstances during session restore. | 1851 // a SiteInstance yet, in which case it will be assigned on first commit. |
1852 if (!old_item || | 1852 if (!old_item || |
1853 new_item->item_sequence_number() != old_item->item_sequence_number() || | 1853 new_item->item_sequence_number() != old_item->item_sequence_number() || |
1854 new_item->site_instance() != old_item->site_instance()) { | 1854 (new_item->site_instance() != nullptr && |
| 1855 new_item->site_instance() != old_item->site_instance())) { |
1855 if (old_item && | 1856 if (old_item && |
1856 new_item->document_sequence_number() == | 1857 new_item->document_sequence_number() == |
1857 old_item->document_sequence_number()) { | 1858 old_item->document_sequence_number()) { |
1858 same_document_loads->push_back(std::make_pair(frame, new_item)); | 1859 same_document_loads->push_back(std::make_pair(frame, new_item)); |
1859 } else { | 1860 } else { |
1860 different_document_loads->push_back(std::make_pair(frame, new_item)); | 1861 different_document_loads->push_back(std::make_pair(frame, new_item)); |
1861 } | 1862 } |
1862 return; | 1863 return; |
1863 } | 1864 } |
1864 | 1865 |
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2031 } | 2032 } |
2032 } | 2033 } |
2033 } | 2034 } |
2034 | 2035 |
2035 void NavigationControllerImpl::SetGetTimestampCallbackForTest( | 2036 void NavigationControllerImpl::SetGetTimestampCallbackForTest( |
2036 const base::Callback<base::Time()>& get_timestamp_callback) { | 2037 const base::Callback<base::Time()>& get_timestamp_callback) { |
2037 get_timestamp_callback_ = get_timestamp_callback; | 2038 get_timestamp_callback_ = get_timestamp_callback; |
2038 } | 2039 } |
2039 | 2040 |
2040 } // namespace content | 2041 } // namespace content |
OLD | NEW |