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

Side by Side Diff: content/renderer/history_controller.h

Issue 2155443002: Clear stale NavigationParams from HistoryController. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2785
Patch Set: Created 4 years, 5 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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, 2009 Torch Mobile Inc. All rights reserved. 7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved.
8 * (http://www.torchmobile.com/) 8 * (http://www.torchmobile.com/)
9 * 9 *
10 * Redistribution and use in source and binary forms, with or without 10 * Redistribution and use in source and binary forms, with or without
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 const blink::WebHistoryItem& item, 146 const blink::WebHistoryItem& item,
147 bool clone_children_of_target); 147 bool clone_children_of_target);
148 148
149 RenderViewImpl* render_view_; 149 RenderViewImpl* render_view_;
150 150
151 // A HistoryEntry representing the currently-loaded page. 151 // A HistoryEntry representing the currently-loaded page.
152 std::unique_ptr<HistoryEntry> current_entry_; 152 std::unique_ptr<HistoryEntry> current_entry_;
153 // A HistoryEntry representing the page that is being loaded, or an empty 153 // A HistoryEntry representing the page that is being loaded, or an empty
154 // scoped_ptr if no page is being loaded. 154 // scoped_ptr if no page is being loaded.
155 std::unique_ptr<HistoryEntry> provisional_entry_; 155 std::unique_ptr<HistoryEntry> provisional_entry_;
156 // The NavigationParams corresponding to the last load that was initiated by 156
157 // |GoToEntry|. This is kept around so that it can be passed into existing 157 // The NavigationParams corresponding to the last back/forward load that was
158 // frames modified during a history navigation in GoToEntry(), and can be 158 // initiated by |GoToEntry|. This is kept around so that it can be passed into
159 // existing frames affected by a history navigation in GoToEntry(), and can be
159 // passed into frames created after the commit that resulted from the 160 // passed into frames created after the commit that resulted from the
160 // navigation in GetItemForNewChildFrame(). 161 // navigation in GetItemForNewChildFrame().
162 //
163 // This is reset in UpdateForCommit if we see a commit from a different
164 // navigation, to avoid using stale parameters.
161 std::unique_ptr<NavigationParams> navigation_params_; 165 std::unique_ptr<NavigationParams> navigation_params_;
162 166
163 DISALLOW_COPY_AND_ASSIGN(HistoryController); 167 DISALLOW_COPY_AND_ASSIGN(HistoryController);
164 }; 168 };
165 169
166 } // namespace content 170 } // namespace content
167 171
168 #endif // CONTENT_RENDERER_HISTORY_CONTROLLER_H_ 172 #endif // CONTENT_RENDERER_HISTORY_CONTROLLER_H_
OLDNEW
« no previous file with comments | « content/browser/frame_host/navigation_controller_impl_browsertest.cc ('k') | content/renderer/history_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698