| OLD | NEW |
| 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/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/i18n/number_formatting.h" | 8 #include "base/i18n/number_formatting.h" |
| 9 #include "base/i18n/rtl.h" | 9 #include "base/i18n/rtl.h" |
| 10 #include "base/location.h" | 10 #include "base/location.h" |
| (...skipping 1545 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1556 | 1556 |
| 1557 void TaskManager::ModelChanged() { | 1557 void TaskManager::ModelChanged() { |
| 1558 model_->ModelChanged(); | 1558 model_->ModelChanged(); |
| 1559 } | 1559 } |
| 1560 | 1560 |
| 1561 // static | 1561 // static |
| 1562 TaskManager* TaskManager::GetInstance() { | 1562 TaskManager* TaskManager::GetInstance() { |
| 1563 return base::Singleton<TaskManager>::get(); | 1563 return base::Singleton<TaskManager>::get(); |
| 1564 } | 1564 } |
| 1565 | 1565 |
| 1566 void TaskManager::OpenAboutMemory() { | |
| 1567 Profile* profile = ProfileManager::GetLastUsedProfileAllowedByPolicy(); | |
| 1568 if (profile->IsGuestSession() && !g_browser_process->local_state()-> | |
| 1569 GetBoolean(prefs::kBrowserGuestModeEnabled)) { | |
| 1570 UserManager::Show(base::FilePath(), | |
| 1571 profiles::USER_MANAGER_NO_TUTORIAL, | |
| 1572 profiles::USER_MANAGER_SELECT_PROFILE_CHROME_MEMORY); | |
| 1573 return; | |
| 1574 } | |
| 1575 | |
| 1576 chrome::NavigateParams params( | |
| 1577 profile, GURL(chrome::kChromeUIMemoryURL), ui::PAGE_TRANSITION_LINK); | |
| 1578 params.disposition = NEW_FOREGROUND_TAB; | |
| 1579 chrome::Navigate(¶ms); | |
| 1580 } | |
| 1581 | |
| 1582 TaskManager::TaskManager() | 1566 TaskManager::TaskManager() |
| 1583 : model_(new TaskManagerModel(this)) { | 1567 : model_(new TaskManagerModel(this)) { |
| 1584 } | 1568 } |
| 1585 | 1569 |
| 1586 TaskManager::~TaskManager() { | 1570 TaskManager::~TaskManager() { |
| 1587 } | 1571 } |
| OLD | NEW |