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

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

Issue 1794513003: Don't rely on the pending NavigationEntry for location.replace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add test for 593153 Created 4 years, 9 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 #ifndef CONTENT_BROWSER_FRAME_HOST_NAVIGATION_CONTROLLER_IMPL_H_ 5 #ifndef CONTENT_BROWSER_FRAME_HOST_NAVIGATION_CONTROLLER_IMPL_H_
6 #define CONTENT_BROWSER_FRAME_HOST_NAVIGATION_CONTROLLER_IMPL_H_ 6 #define CONTENT_BROWSER_FRAME_HOST_NAVIGATION_CONTROLLER_IMPL_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after
365 // An entry we haven't gotten a response for yet. This will be discarded 365 // An entry we haven't gotten a response for yet. This will be discarded
366 // when we navigate again. It's used only so we know what the currently 366 // when we navigate again. It's used only so we know what the currently
367 // displayed tab is. 367 // displayed tab is.
368 // 368 //
369 // This may refer to an item in the entries_ list if the pending_entry_index_ 369 // This may refer to an item in the entries_ list if the pending_entry_index_
370 // == -1, or it may be its own entry that should be deleted. Be careful with 370 // == -1, or it may be its own entry that should be deleted. Be careful with
371 // the memory management. 371 // the memory management.
372 NavigationEntryImpl* pending_entry_; 372 NavigationEntryImpl* pending_entry_;
373 373
374 // If a new entry fails loading, details about it are temporarily held here 374 // If a new entry fails loading, details about it are temporarily held here
375 // until the error page is shown. These variables are only valid if 375 // until the error page is shown (or 0 otherwise).
376 // |failed_pending_entry_id_| is not 0.
377 // 376 //
378 // TODO(avi): We need a better way to handle the connection between failed 377 // TODO(avi): We need a better way to handle the connection between failed
379 // loads and the subsequent load of the error page. This current approach has 378 // loads and the subsequent load of the error page. This current approach has
380 // issues: 1. This might hang around longer than we'd like if there is no 379 // issues: 1. This might hang around longer than we'd like if there is no
381 // error page loaded, and 2. This doesn't work very well for frames. 380 // error page loaded, and 2. This doesn't work very well for frames.
382 // http://crbug.com/474261 381 // http://crbug.com/474261
383 int failed_pending_entry_id_; 382 int failed_pending_entry_id_;
384 bool failed_pending_entry_should_replace_;
385 383
386 // The index of the currently visible entry. 384 // The index of the currently visible entry.
387 int last_committed_entry_index_; 385 int last_committed_entry_index_;
388 386
389 // The index of the pending entry if it is in entries_, or -1 if 387 // The index of the pending entry if it is in entries_, or -1 if
390 // pending_entry_ is a new entry (created by LoadURL). 388 // pending_entry_ is a new entry (created by LoadURL).
391 int pending_entry_index_; 389 int pending_entry_index_;
392 390
393 // The index for the entry that is shown until a navigation occurs. This is 391 // The index for the entry that is shown until a navigation occurs. This is
394 // used for interstitial pages. -1 if there are no such entry. 392 // used for interstitial pages. -1 if there are no such entry.
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
446 TimeSmoother time_smoother_; 444 TimeSmoother time_smoother_;
447 445
448 scoped_ptr<NavigationEntryScreenshotManager> screenshot_manager_; 446 scoped_ptr<NavigationEntryScreenshotManager> screenshot_manager_;
449 447
450 DISALLOW_COPY_AND_ASSIGN(NavigationControllerImpl); 448 DISALLOW_COPY_AND_ASSIGN(NavigationControllerImpl);
451 }; 449 };
452 450
453 } // namespace content 451 } // namespace content
454 452
455 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATION_CONTROLLER_IMPL_H_ 453 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATION_CONTROLLER_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698