| 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 1539 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1550 | 1550 |
| 1551 void TaskManager::ModelChanged() { | 1551 void TaskManager::ModelChanged() { |
| 1552 model_->ModelChanged(); | 1552 model_->ModelChanged(); |
| 1553 } | 1553 } |
| 1554 | 1554 |
| 1555 // static | 1555 // static |
| 1556 TaskManager* TaskManager::GetInstance() { | 1556 TaskManager* TaskManager::GetInstance() { |
| 1557 return base::Singleton<TaskManager>::get(); | 1557 return base::Singleton<TaskManager>::get(); |
| 1558 } | 1558 } |
| 1559 | 1559 |
| 1560 void TaskManager::OpenAboutMemory(chrome::HostDesktopType desktop_type) { | 1560 void TaskManager::OpenAboutMemory() { |
| 1561 Profile* profile = ProfileManager::GetLastUsedProfileAllowedByPolicy(); | 1561 Profile* profile = ProfileManager::GetLastUsedProfileAllowedByPolicy(); |
| 1562 if (profile->IsGuestSession() && !g_browser_process->local_state()-> | 1562 if (profile->IsGuestSession() && !g_browser_process->local_state()-> |
| 1563 GetBoolean(prefs::kBrowserGuestModeEnabled)) { | 1563 GetBoolean(prefs::kBrowserGuestModeEnabled)) { |
| 1564 UserManager::Show(base::FilePath(), | 1564 UserManager::Show(base::FilePath(), |
| 1565 profiles::USER_MANAGER_NO_TUTORIAL, | 1565 profiles::USER_MANAGER_NO_TUTORIAL, |
| 1566 profiles::USER_MANAGER_SELECT_PROFILE_CHROME_MEMORY); | 1566 profiles::USER_MANAGER_SELECT_PROFILE_CHROME_MEMORY); |
| 1567 return; | 1567 return; |
| 1568 } | 1568 } |
| 1569 | 1569 |
| 1570 chrome::NavigateParams params( | 1570 chrome::NavigateParams params( |
| 1571 profile, GURL(chrome::kChromeUIMemoryURL), ui::PAGE_TRANSITION_LINK); | 1571 profile, GURL(chrome::kChromeUIMemoryURL), ui::PAGE_TRANSITION_LINK); |
| 1572 params.disposition = NEW_FOREGROUND_TAB; | 1572 params.disposition = NEW_FOREGROUND_TAB; |
| 1573 params.host_desktop_type = desktop_type; | |
| 1574 chrome::Navigate(¶ms); | 1573 chrome::Navigate(¶ms); |
| 1575 } | 1574 } |
| 1576 | 1575 |
| 1577 TaskManager::TaskManager() | 1576 TaskManager::TaskManager() |
| 1578 : model_(new TaskManagerModel(this)) { | 1577 : model_(new TaskManagerModel(this)) { |
| 1579 } | 1578 } |
| 1580 | 1579 |
| 1581 TaskManager::~TaskManager() { | 1580 TaskManager::~TaskManager() { |
| 1582 } | 1581 } |
| OLD | NEW |