Chromium Code Reviews| Index: chrome/browser/task_manager/task_manager.cc |
| diff --git a/chrome/browser/task_manager/task_manager.cc b/chrome/browser/task_manager/task_manager.cc |
| index 700456e5de75fbabce67dcddf1c0743423e8eaf6..10feca9b2c0fb772a6a0a8d41cb3fef83a7ce308 100644 |
| --- a/chrome/browser/task_manager/task_manager.cc |
| +++ b/chrome/browser/task_manager/task_manager.cc |
| @@ -8,6 +8,7 @@ |
| #include "base/i18n/number_formatting.h" |
| #include "base/i18n/rtl.h" |
| #include "base/prefs/pref_registry_simple.h" |
| +#include "base/prefs/pref_service.h" |
| #include "base/process/process_metrics.h" |
| #include "base/stl_util.h" |
| #include "base/strings/string16.h" |
| @@ -16,6 +17,7 @@ |
| #include "base/strings/utf_string_conversions.h" |
| #include "chrome/browser/browser_process.h" |
| #include "chrome/browser/profiles/profile_manager.h" |
| +#include "chrome/browser/profiles/profile_window.h" |
| #include "chrome/browser/task_manager/background_information.h" |
| #include "chrome/browser/task_manager/browser_process_resource_provider.h" |
| #include "chrome/browser/task_manager/child_process_resource_provider.h" |
| @@ -27,6 +29,7 @@ |
| #include "chrome/browser/task_manager/tab_contents_information.h" |
| #include "chrome/browser/task_manager/web_contents_resource_provider.h" |
| #include "chrome/browser/ui/browser_navigator.h" |
| +#include "chrome/browser/ui/user_manager.h" |
| #include "chrome/common/pref_names.h" |
| #include "chrome/common/url_constants.h" |
| #include "chrome/grit/generated_resources.h" |
| @@ -1527,6 +1530,17 @@ TaskManager* TaskManager::GetInstance() { |
| } |
| void TaskManager::OpenAboutMemory(chrome::HostDesktopType desktop_type) { |
| + Profile* profile = ProfileManager::GetLastUsedProfileAllowedByPolicy(); |
| + if (profile->IsGuestSession()) { |
|
noms (inactive)
2014/10/08 21:06:08
Hmmmm so what happens if you open the task manager
Mike Lerman
2014/10/09 14:02:45
That's why there's a second condition that verifie
noms (inactive)
2014/10/09 16:45:13
Ah, got it. Then would you mind combining the two
Mike Lerman
2014/10/09 17:17:20
Done.
|
| + PrefService* local_state = g_browser_process->local_state(); |
| + if (!local_state->GetBoolean(prefs::kBrowserGuestModeEnabled)) { |
| + UserManager::Show(base::FilePath(), |
| + profiles::USER_MANAGER_NO_TUTORIAL, |
| + profiles::USER_MANAGER_SELECT_PROFILE_CHROME_MEMORY); |
| + return; |
| + } |
| + } |
| + |
| chrome::NavigateParams params( |
| ProfileManager::GetLastUsedProfileAllowedByPolicy(), |
| GURL(chrome::kChromeUIMemoryURL), |