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

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: Rebase 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
« no previous file with comments | « no previous file | content/browser/frame_host/navigation_controller_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 358 matching lines...) Expand 10 before | Expand all | Expand 10 after
369 // An entry we haven't gotten a response for yet. This will be discarded 369 // An entry we haven't gotten a response for yet. This will be discarded
370 // when we navigate again. It's used only so we know what the currently 370 // when we navigate again. It's used only so we know what the currently
371 // displayed tab is. 371 // displayed tab is.
372 // 372 //
373 // This may refer to an item in the entries_ list if the pending_entry_index_ 373 // This may refer to an item in the entries_ list if the pending_entry_index_
374 // == -1, or it may be its own entry that should be deleted. Be careful with 374 // == -1, or it may be its own entry that should be deleted. Be careful with
375 // the memory management. 375 // the memory management.
376 NavigationEntryImpl* pending_entry_; 376 NavigationEntryImpl* pending_entry_;
377 377
378 // If a new entry fails loading, details about it are temporarily held here 378 // If a new entry fails loading, details about it are temporarily held here
379 // until the error page is shown. These variables are only valid if 379 // until the error page is shown (or 0 otherwise).
380 // |failed_pending_entry_id_| is not 0.
381 // 380 //
382 // TODO(avi): We need a better way to handle the connection between failed 381 // TODO(avi): We need a better way to handle the connection between failed
383 // loads and the subsequent load of the error page. This current approach has 382 // loads and the subsequent load of the error page. This current approach has
384 // issues: 1. This might hang around longer than we'd like if there is no 383 // issues: 1. This might hang around longer than we'd like if there is no
385 // error page loaded, and 2. This doesn't work very well for frames. 384 // error page loaded, and 2. This doesn't work very well for frames.
386 // http://crbug.com/474261 385 // http://crbug.com/474261
387 int failed_pending_entry_id_; 386 int failed_pending_entry_id_;
388 bool failed_pending_entry_should_replace_;
389 387
390 // The index of the currently visible entry. 388 // The index of the currently visible entry.
391 int last_committed_entry_index_; 389 int last_committed_entry_index_;
392 390
393 // The index of the pending entry if it is in entries_, or -1 if 391 // The index of the pending entry if it is in entries_, or -1 if
394 // pending_entry_ is a new entry (created by LoadURL). 392 // pending_entry_ is a new entry (created by LoadURL).
395 int pending_entry_index_; 393 int pending_entry_index_;
396 394
397 // The index for the entry that is shown until a navigation occurs. This is 395 // The index for the entry that is shown until a navigation occurs. This is
398 // used for interstitial pages. -1 if there are no such entry. 396 // used for interstitial pages. -1 if there are no such entry.
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
450 TimeSmoother time_smoother_; 448 TimeSmoother time_smoother_;
451 449
452 scoped_ptr<NavigationEntryScreenshotManager> screenshot_manager_; 450 scoped_ptr<NavigationEntryScreenshotManager> screenshot_manager_;
453 451
454 DISALLOW_COPY_AND_ASSIGN(NavigationControllerImpl); 452 DISALLOW_COPY_AND_ASSIGN(NavigationControllerImpl);
455 }; 453 };
456 454
457 } // namespace content 455 } // namespace content
458 456
459 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATION_CONTROLLER_IMPL_H_ 457 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATION_CONTROLLER_IMPL_H_
OLDNEW
« no previous file with comments | « no previous file | content/browser/frame_host/navigation_controller_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698