Chromium Code Reviews| 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 1109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1120 // to show chrome://bookmarks/#1 when the bookmarks webui extension changes | 1120 // to show chrome://bookmarks/#1 when the bookmarks webui extension changes |
| 1121 // the URL. | 1121 // the URL. |
| 1122 update_virtual_url = needs_update; | 1122 update_virtual_url = needs_update; |
| 1123 } | 1123 } |
| 1124 | 1124 |
| 1125 // Don't use the page type from the pending entry. Some interstitial page | 1125 // Don't use the page type from the pending entry. Some interstitial page |
| 1126 // may have set the type to interstitial. Once we commit, however, the page | 1126 // may have set the type to interstitial. Once we commit, however, the page |
| 1127 // type must always be normal or error. | 1127 // type must always be normal or error. |
| 1128 new_entry->set_page_type(params.url_is_unreachable ? PAGE_TYPE_ERROR | 1128 new_entry->set_page_type(params.url_is_unreachable ? PAGE_TYPE_ERROR |
| 1129 : PAGE_TYPE_NORMAL); | 1129 : PAGE_TYPE_NORMAL); |
| 1130 new_entry->SetURL(params.url); | 1130 if (params.url != new_entry->GetURL()) { |
|
estark
2016/08/15 08:14:08
Is this check just an optimization? I'm concerned
jam
2016/08/15 19:23:58
It wasn't; looking at it again it was poorly writt
mmenke
2016/08/15 22:48:31
It could be two different servers with the same ho
| |
| 1131 new_entry->SetURL(params.url); | |
| 1132 // New URL means that we can't use the old SSLStatus. | |
| 1133 new_entry->GetSSL() = SSLStatus(); | |
| 1134 } | |
| 1135 | |
| 1136 if (rfh->frame_tree_node()->IsMainFrame()) { | |
| 1137 // In case of redirects (same process or across different ones), the | |
| 1138 // SSLStatus was cached on the pending RFH so use it now. | |
| 1139 SSLStatus ssl_status; | |
| 1140 if (rfh->GetSSLStatusForPendingNavigate(params.url, &ssl_status)) | |
|
estark
2016/08/15 08:14:08
Just checking -- we're guaranteed that the returne
jam
2016/08/15 19:23:58
I don't think this is guaranteed. i.e. in the Site
| |
| 1141 new_entry->GetSSL() = ssl_status; | |
| 1142 } | |
| 1143 | |
| 1131 if (update_virtual_url) | 1144 if (update_virtual_url) |
| 1132 UpdateVirtualURLToURL(new_entry.get(), params.url); | 1145 UpdateVirtualURLToURL(new_entry.get(), params.url); |
| 1133 new_entry->SetReferrer(params.referrer); | 1146 new_entry->SetReferrer(params.referrer); |
| 1134 new_entry->SetPageID(params.page_id); | 1147 new_entry->SetPageID(params.page_id); |
| 1135 new_entry->SetTransitionType(params.transition); | 1148 new_entry->SetTransitionType(params.transition); |
| 1136 new_entry->set_site_instance( | 1149 new_entry->set_site_instance( |
| 1137 static_cast<SiteInstanceImpl*>(rfh->GetSiteInstance())); | 1150 static_cast<SiteInstanceImpl*>(rfh->GetSiteInstance())); |
| 1138 new_entry->SetOriginalRequestURL(params.original_request_url); | 1151 new_entry->SetOriginalRequestURL(params.original_request_url); |
| 1139 new_entry->SetIsOverridingUserAgent(params.is_overriding_user_agent); | 1152 new_entry->SetIsOverridingUserAgent(params.is_overriding_user_agent); |
| 1140 | 1153 |
| (...skipping 953 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2094 } | 2107 } |
| 2095 } | 2108 } |
| 2096 } | 2109 } |
| 2097 | 2110 |
| 2098 void NavigationControllerImpl::SetGetTimestampCallbackForTest( | 2111 void NavigationControllerImpl::SetGetTimestampCallbackForTest( |
| 2099 const base::Callback<base::Time()>& get_timestamp_callback) { | 2112 const base::Callback<base::Time()>& get_timestamp_callback) { |
| 2100 get_timestamp_callback_ = get_timestamp_callback; | 2113 get_timestamp_callback_ = get_timestamp_callback; |
| 2101 } | 2114 } |
| 2102 | 2115 |
| 2103 } // namespace content | 2116 } // namespace content |
| OLD | NEW |