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

Side by Side Diff: chrome/browser/ui/views/task_manager_view.cc

Issue 10084030: views: Fix some DCHECKs to use (expected, actual) order. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 8 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/task_manager/task_manager.h" 5 #include "chrome/browser/task_manager/task_manager.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/metrics/stats_table.h" 9 #include "base/metrics/stats_table.h"
10 #include "base/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
(...skipping 585 matching lines...) Expand 10 before | Expand all | Expand 10 after
596 if (focus_manager) 596 if (focus_manager)
597 focus_manager->SetFocusedView(instance_->tab_table_); 597 focus_manager->SetFocusedView(instance_->tab_table_);
598 } 598 }
599 599
600 // ButtonListener implementation. 600 // ButtonListener implementation.
601 void TaskManagerView::ButtonPressed( 601 void TaskManagerView::ButtonPressed(
602 views::Button* sender, const views::Event& event) { 602 views::Button* sender, const views::Event& event) {
603 if (purge_memory_button_ && (sender == purge_memory_button_)) { 603 if (purge_memory_button_ && (sender == purge_memory_button_)) {
604 MemoryPurger::PurgeAll(); 604 MemoryPurger::PurgeAll();
605 } else { 605 } else {
606 DCHECK_EQ(sender, kill_button_); 606 DCHECK_EQ(kill_button_, sender);
607 for (views::TableSelectionIterator iter = tab_table_->SelectionBegin(); 607 for (views::TableSelectionIterator iter = tab_table_->SelectionBegin();
608 iter != tab_table_->SelectionEnd(); ++iter) 608 iter != tab_table_->SelectionEnd(); ++iter)
609 task_manager_->KillProcess(*iter); 609 task_manager_->KillProcess(*iter);
610 } 610 }
611 } 611 }
612 612
613 // DialogDelegate implementation. 613 // DialogDelegate implementation.
614 bool TaskManagerView::CanResize() const { 614 bool TaskManagerView::CanResize() const {
615 return true; 615 return true;
616 } 616 }
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
795 // Declared in browser_dialogs.h so others don't need to depend on our header. 795 // Declared in browser_dialogs.h so others don't need to depend on our header.
796 void ShowTaskManager() { 796 void ShowTaskManager() {
797 TaskManagerView::Show(false); 797 TaskManagerView::Show(false);
798 } 798 }
799 799
800 void ShowBackgroundPages() { 800 void ShowBackgroundPages() {
801 TaskManagerView::Show(true); 801 TaskManagerView::Show(true);
802 } 802 }
803 803
804 } // namespace browser 804 } // namespace browser
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698