| 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 1201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1212 } else if (params.nav_entry_id) { | 1212 } else if (params.nav_entry_id) { |
| 1213 // This is a browser-initiated navigation (back/forward/reload). | 1213 // This is a browser-initiated navigation (back/forward/reload). |
| 1214 entry = GetEntryWithUniqueID(params.nav_entry_id); | 1214 entry = GetEntryWithUniqueID(params.nav_entry_id); |
| 1215 | 1215 |
| 1216 // Needed for the restore case, where the serialized NavigationEntry doesn't | 1216 // Needed for the restore case, where the serialized NavigationEntry doesn't |
| 1217 // have the SSL state. Note that for in-page navigation, there's no | 1217 // have the SSL state. Note that for in-page navigation, there's no |
| 1218 // SSLStatus in the NavigationHandle so don't overwrite the existing entry's | 1218 // SSLStatus in the NavigationHandle so don't overwrite the existing entry's |
| 1219 // SSLStatus. | 1219 // SSLStatus. |
| 1220 if (!is_in_page) | 1220 if (!is_in_page) |
| 1221 entry->GetSSL() = handle->ssl_status(); | 1221 entry->GetSSL() = handle->ssl_status(); |
| 1222 |
| 1223 // Back/forward navigations can alter "request desktop site" state. |
| 1224 if (entry && GetLastCommittedEntry() && |
| 1225 entry->GetIsOverridingUserAgent() != |
| 1226 GetLastCommittedEntry()->GetIsOverridingUserAgent()) |
| 1227 delegate_->UpdateOverridingUserAgent(); |
| 1222 } else { | 1228 } else { |
| 1223 // This is renderer-initiated. The only kinds of renderer-initated | 1229 // This is renderer-initiated. The only kinds of renderer-initated |
| 1224 // navigations that are EXISTING_PAGE are reloads and location.replace, | 1230 // navigations that are EXISTING_PAGE are reloads and location.replace, |
| 1225 // which land us at the last committed entry. | 1231 // which land us at the last committed entry. |
| 1226 entry = GetLastCommittedEntry(); | 1232 entry = GetLastCommittedEntry(); |
| 1227 | 1233 |
| 1228 // If this is an in-page navigation, then there's no SSLStatus in the | 1234 // If this is an in-page navigation, then there's no SSLStatus in the |
| 1229 // NavigationHandle so don't overwrite the existing entry's SSLStatus. | 1235 // NavigationHandle so don't overwrite the existing entry's SSLStatus. |
| 1230 if (!is_in_page) | 1236 if (!is_in_page) |
| 1231 entry->GetSSL() = handle->ssl_status(); | 1237 entry->GetSSL() = handle->ssl_status(); |
| (...skipping 921 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2153 } | 2159 } |
| 2154 } | 2160 } |
| 2155 } | 2161 } |
| 2156 | 2162 |
| 2157 void NavigationControllerImpl::SetGetTimestampCallbackForTest( | 2163 void NavigationControllerImpl::SetGetTimestampCallbackForTest( |
| 2158 const base::Callback<base::Time()>& get_timestamp_callback) { | 2164 const base::Callback<base::Time()>& get_timestamp_callback) { |
| 2159 get_timestamp_callback_ = get_timestamp_callback; | 2165 get_timestamp_callback_ = get_timestamp_callback; |
| 2160 } | 2166 } |
| 2161 | 2167 |
| 2162 } // namespace content | 2168 } // namespace content |
| OLD | NEW |