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

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

Issue 1332003002: Add option to disallow the discarding of a tab that was previously discarded. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: sky@ and rkaplow@ comments. Created 5 years, 3 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/memory/tab_stats.cc ('k') | chrome/browser/ui/tabs/tab_discard_state.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/browser.cc
diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc
index 455bd2b5320b44643e9f00dbe55ea6110519e2a6..cd11f0904b4f60d9f0f2d1314ee281e5033f4424 100644
--- a/chrome/browser/ui/browser.cc
+++ b/chrome/browser/ui/browser.cc
@@ -132,6 +132,7 @@
#include "chrome/browser/ui/tab_dialogs.h"
#include "chrome/browser/ui/tab_helpers.h"
#include "chrome/browser/ui/tab_modal_confirm_dialog.h"
+#include "chrome/browser/ui/tabs/tab_discard_state.h"
#include "chrome/browser/ui/tabs/tab_menu_model.h"
#include "chrome/browser/ui/tabs/tab_strip_model.h"
#include "chrome/browser/ui/tabs/tab_strip_model_utils.h"
@@ -1054,7 +1055,7 @@ void Browser::ActiveTabChanged(WebContents* old_contents,
exclusive_access_manager_->OnTabDetachedFromView(old_contents);
// Discarded tabs always get reloaded.
- if (tab_strip_model_->IsTabDiscarded(index)) {
+ if (TabDiscardState::IsDiscarded(new_contents)) {
LOG(WARNING) << "Reloading discarded tab at " << index;
static int reload_count = 0;
UMA_HISTOGRAM_CUSTOM_COUNTS(
« no previous file with comments | « chrome/browser/memory/tab_stats.cc ('k') | chrome/browser/ui/tabs/tab_discard_state.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698