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

Unified Diff: chrome/browser/ui/gtk/tabs/tab_strip_gtk.cc

Issue 10797003: Change variable name to avoid scoping issues. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 5 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/gtk/tabs/tab_strip_gtk.cc
===================================================================
--- chrome/browser/ui/gtk/tabs/tab_strip_gtk.cc (revision 147038)
+++ chrome/browser/ui/gtk/tabs/tab_strip_gtk.cc (working copy)
@@ -1279,11 +1279,19 @@
return;
std::vector<TabGtk*> tabs;
+ bool tab_found = false;
for (size_t i = 0; i < model()->selection_model().size(); i++) {
- TabGtk* tab = GetTabAt(model()->selection_model().selected_indices()[i]);
- if (!tab->closing())
- tabs.push_back(tab);
+ TabGtk* selected_tab =
+ GetTabAt(model()->selection_model().selected_indices()[i]);
sky 2012/07/18 21:12:04 In looking at this again, this should be GetTabAtA
+ if (!selected_tab->closing()) {
+ tabs.push_back(selected_tab);
+ if (selected_tab == tab)
+ tab_found = true;
+ }
}
+ // If the tab was not in the selection we cannot start the drag operation.
+ if (!tab_found)
sky 2012/07/18 21:12:04 This should be a DCHECK, and you should make it a
+ return;
drag_controller_.reset(new DraggedTabControllerGtk(this, tab, tabs));
drag_controller_->CaptureDragInfo(point);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698