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

Unified Diff: chrome/browser/extensions/extension_tabs_module.cc

Issue 2821011: Removes phantom tabs. (Closed)
Patch Set: Created 10 years, 6 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
Index: chrome/browser/extensions/extension_tabs_module.cc
diff --git a/chrome/browser/extensions/extension_tabs_module.cc b/chrome/browser/extensions/extension_tabs_module.cc
index 71a8753a4b236cb723de8c40d42f9054d9a1a9ac..0778a0e58cb66e591e57d454f6425b982ce3c02f 100644
--- a/chrome/browser/extensions/extension_tabs_module.cc
+++ b/chrome/browser/extensions/extension_tabs_module.cc
@@ -784,13 +784,6 @@ bool RemoveTabFunction::RunImpl() {
&browser, NULL, &contents, NULL, &error_))
return false;
- int tab_index = browser->GetIndexOfController(&contents->controller());
- if (browser->tabstrip_model()->IsPhantomTab(tab_index)) {
- // Don't allow closing phantom tabs.
- error_ = keys::kCannotRemovePhantomTab;
- return false;
- }
-
// Close the tab in this convoluted way, since there's a chance that the tab
// is being dragged, or we're in some other nested event loop. This code path
// should ensure that the tab is safely closed under such circumstances,
@@ -985,8 +978,8 @@ bool DetectTabLanguageFunction::RunImpl() {
}
if (contents->controller().needs_reload()) {
- // If the tab hasn't been loaded, such as happens with phantom tabs, don't
- // wait for the tab to load, instead return.
+ // If the tab hasn't been loaded don't wait for the tab to load, instead
+ // return.
error_ = keys::kCannotDetermineLanguageOfUnloadedTab;
return false;
}
« no previous file with comments | « chrome/browser/extensions/extension_message_service.cc ('k') | chrome/browser/extensions/extension_tabs_module_constants.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698