diff options
author | pkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-18 19:32:58 +0000 |
---|---|---|
committer | pkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-18 19:32:58 +0000 |
commit | 3148c5d6e03492bf0f0310981e3b87e281c22f89 (patch) | |
tree | 93fbf3989c3f582d6fca48199741312cbdcdbffb /chrome/browser/views | |
parent | 269a4ccc9ac806f5cf95603e4bd93c1d63bfb415 (diff) | |
download | chromium_src-3148c5d6e03492bf0f0310981e3b87e281c22f89.zip chromium_src-3148c5d6e03492bf0f0310981e3b87e281c22f89.tar.gz chromium_src-3148c5d6e03492bf0f0310981e3b87e281c22f89.tar.bz2 |
Hook up the memory purger to all the relevant locations.
This removes the two-state purge/reset code (no longer necessary), and the hooks to the power monitor (not ready to turn those on without more work and testing).
BUG=23400
TEST=Run Chrome with --purge-memory-button, use it for awhile, open the Task Manager, and click "Purge Memory". You should still be able to use the program normally, and hopefully we dumped some memory out too (varies by usage).
Review URL: http://codereview.chromium.org/399028
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32376 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/views')
-rw-r--r-- | chrome/browser/views/task_manager_view.cc | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/chrome/browser/views/task_manager_view.cc b/chrome/browser/views/task_manager_view.cc index bcfb422..3487f0e 100644 --- a/chrome/browser/views/task_manager_view.cc +++ b/chrome/browser/views/task_manager_view.cc @@ -254,7 +254,6 @@ class TaskManagerView : public views::View, bool GetSavedAlwaysOnTopState(bool* always_on_top) const; views::NativeButton* purge_memory_button_; - bool purge_memory_button_in_purge_mode_; views::NativeButton* kill_button_; views::Link* about_memory_link_; views::GroupTableView* tab_table_; @@ -287,7 +286,6 @@ TaskManagerView* TaskManagerView::instance_ = NULL; TaskManagerView::TaskManagerView() : purge_memory_button_(NULL), - purge_memory_button_in_purge_mode_(true), task_manager_(TaskManager::GetInstance()), model_(TaskManager::GetInstance()->model()), is_always_on_top_(false) { @@ -492,14 +490,7 @@ void TaskManagerView::Show() { void TaskManagerView::ButtonPressed( views::Button* sender, const views::Event& event) { if (purge_memory_button_ && (sender == purge_memory_button_)) { - if (purge_memory_button_in_purge_mode_) { - MemoryPurger::GetSingleton()->OnSuspend(); - purge_memory_button_->SetLabel(L"Reset purger"); - } else { - MemoryPurger::GetSingleton()->OnResume(); - purge_memory_button_->SetLabel(L"Purge Memory"); - } - purge_memory_button_in_purge_mode_ = !purge_memory_button_in_purge_mode_; + MemoryPurger::PurgeAll(); } else { DCHECK_EQ(sender, kill_button_); for (views::TableSelectionIterator iter = tab_table_->SelectionBegin(); |