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 1222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1233 DCHECK(entry); | 1233 DCHECK(entry); |
1234 | 1234 |
1235 // The URL may have changed due to redirects. | 1235 // The URL may have changed due to redirects. |
1236 entry->set_page_type(params.url_is_unreachable ? PAGE_TYPE_ERROR | 1236 entry->set_page_type(params.url_is_unreachable ? PAGE_TYPE_ERROR |
1237 : PAGE_TYPE_NORMAL); | 1237 : PAGE_TYPE_NORMAL); |
1238 entry->SetURL(params.url); | 1238 entry->SetURL(params.url); |
1239 entry->SetReferrer(params.referrer); | 1239 entry->SetReferrer(params.referrer); |
1240 if (entry->update_virtual_url_with_url()) | 1240 if (entry->update_virtual_url_with_url()) |
1241 UpdateVirtualURLToURL(entry, params.url); | 1241 UpdateVirtualURLToURL(entry, params.url); |
1242 | 1242 |
1243 // The site instance will normally be the same except during session restore, | 1243 // The site instance will normally be the same except |
1244 // when no site instance will be assigned. | 1244 // 1) session restore, when no site instance will be assigned or |
| 1245 // 2) redirect, when the site instance is reset. |
1245 DCHECK(entry->site_instance() == nullptr || | 1246 DCHECK(entry->site_instance() == nullptr || |
| 1247 !entry->GetRedirectChain().empty() || |
1246 entry->site_instance() == rfh->GetSiteInstance()); | 1248 entry->site_instance() == rfh->GetSiteInstance()); |
1247 | 1249 |
1248 // Update the existing FrameNavigationEntry to ensure all of its members | 1250 // Update the existing FrameNavigationEntry to ensure all of its members |
1249 // reflect the parameters coming from the renderer process. | 1251 // reflect the parameters coming from the renderer process. |
1250 entry->AddOrUpdateFrameEntry( | 1252 entry->AddOrUpdateFrameEntry( |
1251 rfh->frame_tree_node(), params.item_sequence_number, | 1253 rfh->frame_tree_node(), params.item_sequence_number, |
1252 params.document_sequence_number, rfh->GetSiteInstance(), nullptr, | 1254 params.document_sequence_number, rfh->GetSiteInstance(), nullptr, |
1253 params.url, params.referrer, params.redirects, params.page_state, | 1255 params.url, params.referrer, params.redirects, params.page_state, |
1254 params.method, params.post_id); | 1256 params.method, params.post_id); |
1255 | 1257 |
(...skipping 897 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2153 } | 2155 } |
2154 } | 2156 } |
2155 } | 2157 } |
2156 | 2158 |
2157 void NavigationControllerImpl::SetGetTimestampCallbackForTest( | 2159 void NavigationControllerImpl::SetGetTimestampCallbackForTest( |
2158 const base::Callback<base::Time()>& get_timestamp_callback) { | 2160 const base::Callback<base::Time()>& get_timestamp_callback) { |
2159 get_timestamp_callback_ = get_timestamp_callback; | 2161 get_timestamp_callback_ = get_timestamp_callback; |
2160 } | 2162 } |
2161 | 2163 |
2162 } // namespace content | 2164 } // namespace content |
OLD | NEW |