| 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/prefs/pref_registry_simple.h" | 10 #include "base/prefs/pref_registry_simple.h" |
| (...skipping 1503 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1514 void TaskManager::ModelChanged() { | 1514 void TaskManager::ModelChanged() { |
| 1515 model_->ModelChanged(); | 1515 model_->ModelChanged(); |
| 1516 } | 1516 } |
| 1517 | 1517 |
| 1518 // static | 1518 // static |
| 1519 TaskManager* TaskManager::GetInstance() { | 1519 TaskManager* TaskManager::GetInstance() { |
| 1520 return Singleton<TaskManager>::get(); | 1520 return Singleton<TaskManager>::get(); |
| 1521 } | 1521 } |
| 1522 | 1522 |
| 1523 void TaskManager::OpenAboutMemory(chrome::HostDesktopType desktop_type) { | 1523 void TaskManager::OpenAboutMemory(chrome::HostDesktopType desktop_type) { |
| 1524 Profile* profile = ProfileManager::GetLastUsedProfileAllowedByPolicy(); | 1524 Profile* profile = |
| 1525 if (profile->IsGuestSession() && !g_browser_process->local_state()-> | 1525 g_browser_process->profile_manager()->GetLastUsedProfileAllowedByPolicy(); |
| 1526 GetBoolean(prefs::kBrowserGuestModeEnabled)) { | 1526 if (profile->IsGuestSession() && |
| 1527 !g_browser_process->local_state()->GetBoolean( |
| 1528 prefs::kBrowserGuestModeEnabled)) { |
| 1527 UserManager::Show(base::FilePath(), | 1529 UserManager::Show(base::FilePath(), |
| 1528 profiles::USER_MANAGER_NO_TUTORIAL, | 1530 profiles::USER_MANAGER_NO_TUTORIAL, |
| 1529 profiles::USER_MANAGER_SELECT_PROFILE_CHROME_MEMORY); | 1531 profiles::USER_MANAGER_SELECT_PROFILE_CHROME_MEMORY); |
| 1530 return; | 1532 return; |
| 1531 } | 1533 } |
| 1532 | 1534 |
| 1533 chrome::NavigateParams params( | 1535 chrome::NavigateParams params( |
| 1534 profile, GURL(chrome::kChromeUIMemoryURL), ui::PAGE_TRANSITION_LINK); | 1536 profile, GURL(chrome::kChromeUIMemoryURL), ui::PAGE_TRANSITION_LINK); |
| 1535 params.disposition = NEW_FOREGROUND_TAB; | 1537 params.disposition = NEW_FOREGROUND_TAB; |
| 1536 params.host_desktop_type = desktop_type; | 1538 params.host_desktop_type = desktop_type; |
| 1537 chrome::Navigate(¶ms); | 1539 chrome::Navigate(¶ms); |
| 1538 } | 1540 } |
| 1539 | 1541 |
| 1540 TaskManager::TaskManager() | 1542 TaskManager::TaskManager() |
| 1541 : model_(new TaskManagerModel(this)) { | 1543 : model_(new TaskManagerModel(this)) { |
| 1542 } | 1544 } |
| 1543 | 1545 |
| 1544 TaskManager::~TaskManager() { | 1546 TaskManager::~TaskManager() { |
| 1545 } | 1547 } |
| OLD | NEW |