diff options
author | jochen@chromium.org <jochen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-02-26 23:41:25 +0000 |
---|---|---|
committer | jochen@chromium.org <jochen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-02-26 23:41:25 +0000 |
commit | 57b58ca1ae8ed2524fd6d4327c3e994f556bfbd3 (patch) | |
tree | 21ca63b05410ac7de74e83d26dca8607d65e72c8 /chrome/browser | |
parent | 86b04537cf9ff0d5f0fb372651c6dfc79bc0c8cc (diff) | |
download | chromium_src-57b58ca1ae8ed2524fd6d4327c3e994f556bfbd3.zip chromium_src-57b58ca1ae8ed2524fd6d4327c3e994f556bfbd3.tar.gz chromium_src-57b58ca1ae8ed2524fd6d4327c3e994f556bfbd3.tar.bz2 |
Don't call NavigationController::PruneAllButActive just before NavigationController::CopyStateFromAndPrune
The latter invokes the former internally anyway
BUG=178103
TEST=nothing should change
R=creis@chromium.org,sreeram@chromium.org
Review URL: https://chromiumcodereview.appspot.com/12335094
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@184771 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
-rw-r--r-- | chrome/browser/instant/instant_controller.cc | 6 | ||||
-rw-r--r-- | chrome/browser/ui/browser_instant_controller.cc | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/chrome/browser/instant/instant_controller.cc b/chrome/browser/instant/instant_controller.cc index 17bdbb0..4af5bc7 100644 --- a/chrome/browser/instant/instant_controller.cc +++ b/chrome/browser/instant/instant_controller.cc @@ -661,9 +661,9 @@ bool InstantController::CommitIfPossible(InstantCommitType type) { history::SOURCE_BROWSED, false); } - preview->GetController().PruneAllButActive(); - - if (type != INSTANT_COMMIT_PRESSED_ALT_ENTER) { + if (type == INSTANT_COMMIT_PRESSED_ALT_ENTER) { + preview->GetController().PruneAllButActive(); + } else { content::WebContents* active_tab = browser_->GetActiveWebContents(); AddSessionStorageHistogram(extended_enabled_, active_tab, preview.get()); preview->GetController().CopyStateFromAndPrune( diff --git a/chrome/browser/ui/browser_instant_controller.cc b/chrome/browser/ui/browser_instant_controller.cc index 5a15dc9..c9a6089 100644 --- a/chrome/browser/ui/browser_instant_controller.cc +++ b/chrome/browser/ui/browser_instant_controller.cc @@ -114,7 +114,6 @@ bool BrowserInstantController::MaybeSwapInInstantNTPContents( return false; *target_contents = instant_ntp.get(); - instant_ntp->GetController().PruneAllButActive(); if (source_contents) { instant_ntp->GetController().CopyStateFromAndPrune( &source_contents->GetController()); @@ -122,6 +121,7 @@ bool BrowserInstantController::MaybeSwapInInstantNTPContents( browser_->tab_strip_model()->GetIndexOfWebContents(source_contents), instant_ntp.Pass()); } else { + instant_ntp->GetController().PruneAllButActive(); // If |source_contents| is NULL, then the caller is responsible for // inserting instant_ntp into the tabstrip and will take ownership. ignore_result(instant_ntp.release()); |