Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(495)

Side by Side Diff: content/browser/frame_host/navigation_controller_impl.cc

Issue 2294343002: Update FrameNavigationEntry members when setting PageState. (Closed)
Patch Set: Remove NOTREACHED, as unit tests are failing. Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 872 matching lines...) Expand 10 before | Expand all | Expand 10 after
883 active_entry->SetTimestamp(timestamp); 883 active_entry->SetTimestamp(timestamp);
884 active_entry->SetHttpStatusCode(params.http_status_code); 884 active_entry->SetHttpStatusCode(params.http_status_code);
885 885
886 FrameNavigationEntry* frame_entry = 886 FrameNavigationEntry* frame_entry =
887 active_entry->GetFrameEntry(rfh->frame_tree_node()); 887 active_entry->GetFrameEntry(rfh->frame_tree_node());
888 if (SiteIsolationPolicy::UseSubframeNavigationEntries()) { 888 if (SiteIsolationPolicy::UseSubframeNavigationEntries()) {
889 // Update the frame-specific PageState. 889 // Update the frame-specific PageState.
890 // We may not find a frame_entry in some cases; ignore the PageState if so. 890 // We may not find a frame_entry in some cases; ignore the PageState if so.
891 // TODO(creis): Remove the "if" once https://crbug.com/522193 is fixed. 891 // TODO(creis): Remove the "if" once https://crbug.com/522193 is fixed.
892 if (frame_entry) 892 if (frame_entry)
893 frame_entry->set_page_state(params.page_state); 893 frame_entry->SetPageState(params.page_state);
894 } else { 894 } else {
895 active_entry->SetPageState(params.page_state); 895 active_entry->SetPageState(params.page_state);
896 } 896 }
897 active_entry->SetRedirectChain(params.redirects); 897 active_entry->SetRedirectChain(params.redirects);
898 898
899 // Use histogram to track memory impact of redirect chain because it's now 899 // Use histogram to track memory impact of redirect chain because it's now
900 // not cleared for committed entries. 900 // not cleared for committed entries.
901 size_t redirect_chain_size = 0; 901 size_t redirect_chain_size = 0;
902 for (size_t i = 0; i < params.redirects.size(); ++i) { 902 for (size_t i = 0; i < params.redirects.size(); ++i) {
903 redirect_chain_size += params.redirects[i].spec().length(); 903 redirect_chain_size += params.redirects[i].spec().length();
(...skipping 1197 matching lines...) Expand 10 before | Expand all | Expand 10 after
2101 } 2101 }
2102 } 2102 }
2103 } 2103 }
2104 2104
2105 void NavigationControllerImpl::SetGetTimestampCallbackForTest( 2105 void NavigationControllerImpl::SetGetTimestampCallbackForTest(
2106 const base::Callback<base::Time()>& get_timestamp_callback) { 2106 const base::Callback<base::Time()>& get_timestamp_callback) {
2107 get_timestamp_callback_ = get_timestamp_callback; 2107 get_timestamp_callback_ = get_timestamp_callback;
2108 } 2108 }
2109 2109
2110 } // namespace content 2110 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/frame_host/frame_navigation_entry.cc ('k') | content/browser/frame_host/navigation_entry_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698