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 1159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1170 entry->SetURL(params.url); | 1170 entry->SetURL(params.url); |
1171 entry->SetReferrer(params.referrer); | 1171 entry->SetReferrer(params.referrer); |
1172 if (entry->update_virtual_url_with_url()) | 1172 if (entry->update_virtual_url_with_url()) |
1173 UpdateVirtualURLToURL(entry, params.url); | 1173 UpdateVirtualURLToURL(entry, params.url); |
1174 | 1174 |
1175 // The redirected to page should not inherit the favicon from the previous | 1175 // The redirected to page should not inherit the favicon from the previous |
1176 // page. | 1176 // page. |
1177 if (ui::PageTransitionIsRedirect(params.transition)) | 1177 if (ui::PageTransitionIsRedirect(params.transition)) |
1178 entry->GetFavicon() = FaviconStatus(); | 1178 entry->GetFavicon() = FaviconStatus(); |
1179 | 1179 |
1180 // The site instance will normally be the same except during session restore, | 1180 // The SiteInstance can change for cross-process location.replace navigations. |
1181 // when no site instance will be assigned. | |
1182 DCHECK(entry->site_instance() == NULL || | |
1183 entry->site_instance() == rfh->GetSiteInstance()); | |
1184 entry->set_site_instance( | 1181 entry->set_site_instance( |
1185 static_cast<SiteInstanceImpl*>(rfh->GetSiteInstance())); | 1182 static_cast<SiteInstanceImpl*>(rfh->GetSiteInstance())); |
1186 | 1183 |
1187 entry->SetHasPostData(params.is_post); | 1184 entry->SetHasPostData(params.is_post); |
1188 entry->SetPostID(params.post_id); | 1185 entry->SetPostID(params.post_id); |
1189 | 1186 |
1190 // The entry we found in the list might be pending if the user hit | 1187 // The entry we found in the list might be pending if the user hit |
1191 // back/forward/reload. This load should commit it (since it's already in the | 1188 // back/forward/reload. This load should commit it (since it's already in the |
1192 // list, we can just discard the pending pointer). We should also discard the | 1189 // list, we can just discard the pending pointer). We should also discard the |
1193 // pending entry if it corresponds to a different navigation, since that one | 1190 // pending entry if it corresponds to a different navigation, since that one |
(...skipping 861 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2055 } | 2052 } |
2056 } | 2053 } |
2057 } | 2054 } |
2058 | 2055 |
2059 void NavigationControllerImpl::SetGetTimestampCallbackForTest( | 2056 void NavigationControllerImpl::SetGetTimestampCallbackForTest( |
2060 const base::Callback<base::Time()>& get_timestamp_callback) { | 2057 const base::Callback<base::Time()>& get_timestamp_callback) { |
2061 get_timestamp_callback_ = get_timestamp_callback; | 2058 get_timestamp_callback_ = get_timestamp_callback; |
2062 } | 2059 } |
2063 | 2060 |
2064 } // namespace content | 2061 } // namespace content |
OLD | NEW |