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

Unified Diff: chrome/browser/ui/browser_commands.cc

Issue 15041004: Replace PruneAllButActive with PruneAllButVisible. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Change to CHECK. Created 7 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/prerender/prerender_manager.cc ('k') | chrome/browser/ui/browser_instant_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/browser_commands.cc
diff --git a/chrome/browser/ui/browser_commands.cc b/chrome/browser/ui/browser_commands.cc
index fd1c0adf77e95dedc17aede0ec10c19c3cf927e7..c1d4bba4c7700dc061aabf0744ce9720097ab936 100644
--- a/chrome/browser/ui/browser_commands.cc
+++ b/chrome/browser/ui/browser_commands.cc
@@ -1008,7 +1008,8 @@ void ViewSource(Browser* browser,
// Note that Clone does not copy the pending or transient entries, so the
// active entry in view_source_contents will be the last committed entry.
WebContents* view_source_contents = contents->Clone();
- view_source_contents->GetController().PruneAllButActive();
+ DCHECK(view_source_contents->GetController().CanPruneAllButVisible());
+ view_source_contents->GetController().PruneAllButVisible();
NavigationEntry* active_entry =
view_source_contents->GetController().GetActiveEntry();
if (!active_entry)
« no previous file with comments | « chrome/browser/prerender/prerender_manager.cc ('k') | chrome/browser/ui/browser_instant_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698