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

Unified Diff: chrome/browser/tabs/tab_strip_model_order_controller.cc

Issue 6291011: Removes debugging code as cause of crash was found. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 11 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/tabs/tab_strip_model_order_controller.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/tabs/tab_strip_model_order_controller.cc
diff --git a/chrome/browser/tabs/tab_strip_model_order_controller.cc b/chrome/browser/tabs/tab_strip_model_order_controller.cc
index 52730ef3886b8f48e56c2d938b3e1a6fc292e7c5..bd309fa4e176e871450bf924d6cb66d4a7879f9f 100644
--- a/chrome/browser/tabs/tab_strip_model_order_controller.cc
+++ b/chrome/browser/tabs/tab_strip_model_order_controller.cc
@@ -64,7 +64,7 @@ int TabStripModelOrderController::DetermineInsertionIndexForAppending() {
}
int TabStripModelOrderController::DetermineNewSelectedIndex(
- int removing_index, volatile int* reason) const {
+ int removing_index) const {
int tab_count = tabstrip_->count();
DCHECK(removing_index >= 0 && removing_index < tab_count);
NavigationController* parent_opener =
@@ -75,43 +75,34 @@ int TabStripModelOrderController::DetermineNewSelectedIndex(
NavigationController* removed_controller =
&tabstrip_->GetTabContentsAt(removing_index)->controller();
// The parent opener should never be the same as the controller being removed.
- CHECK(parent_opener != removed_controller);
+ DCHECK(parent_opener != removed_controller);
int index = tabstrip_->GetIndexOfNextTabContentsOpenedBy(removed_controller,
removing_index,
false);
- if (index != TabStripModel::kNoTab) {
- *reason = 1;
+ if (index != TabStripModel::kNoTab)
return GetValidIndex(index, removing_index);
- }
if (parent_opener) {
// If the tab was in a group, shift selection to the next tab in the group.
int index = tabstrip_->GetIndexOfNextTabContentsOpenedBy(parent_opener,
removing_index,
false);
- if (index != TabStripModel::kNoTab) {
- *reason = 2;
+ if (index != TabStripModel::kNoTab)
return GetValidIndex(index, removing_index);
- }
// If we can't find a subsequent group member, just fall back to the
// parent_opener itself. Note that we use "group" here since opener is
// reset by select operations..
index = tabstrip_->GetIndexOfController(parent_opener);
- if (index != TabStripModel::kNoTab) {
- *reason = 3;
+ if (index != TabStripModel::kNoTab)
return GetValidIndex(index, removing_index);
- }
}
// No opener set, fall through to the default handler...
int selected_index = tabstrip_->selected_index();
- if (selected_index >= (tab_count - 1)) {
- *reason = 4;
+ if (selected_index >= (tab_count - 1))
return selected_index - 1;
- }
- *reason = 5;
return selected_index;
}
« no previous file with comments | « chrome/browser/tabs/tab_strip_model_order_controller.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698