| 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/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
| 9 #include "base/i18n/number_formatting.h" | 9 #include "base/i18n/number_formatting.h" |
| 10 #include "base/i18n/rtl.h" | 10 #include "base/i18n/rtl.h" |
| (...skipping 1245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1256 void TaskManager::ModelChanged() { | 1256 void TaskManager::ModelChanged() { |
| 1257 model_->ModelChanged(); | 1257 model_->ModelChanged(); |
| 1258 } | 1258 } |
| 1259 | 1259 |
| 1260 // static | 1260 // static |
| 1261 TaskManager* TaskManager::GetInstance() { | 1261 TaskManager* TaskManager::GetInstance() { |
| 1262 return Singleton<TaskManager>::get(); | 1262 return Singleton<TaskManager>::get(); |
| 1263 } | 1263 } |
| 1264 | 1264 |
| 1265 void TaskManager::OpenAboutMemory() { | 1265 void TaskManager::OpenAboutMemory() { |
| 1266 // TODO(robertshield): FTB - Merge MAD's TaskManager change. |
| 1266 Browser* browser = browser::FindOrCreateTabbedBrowser( | 1267 Browser* browser = browser::FindOrCreateTabbedBrowser( |
| 1267 ProfileManager::GetDefaultProfileOrOffTheRecord()); | 1268 ProfileManager::GetDefaultProfileOrOffTheRecord()); |
| 1268 chrome::NavigateParams params(browser, GURL(chrome::kChromeUIMemoryURL), | 1269 chrome::NavigateParams params(browser, GURL(chrome::kChromeUIMemoryURL), |
| 1269 content::PAGE_TRANSITION_LINK); | 1270 content::PAGE_TRANSITION_LINK); |
| 1270 params.disposition = NEW_FOREGROUND_TAB; | 1271 params.disposition = NEW_FOREGROUND_TAB; |
| 1271 chrome::Navigate(¶ms); | 1272 chrome::Navigate(¶ms); |
| 1272 } | 1273 } |
| 1273 | 1274 |
| 1274 bool TaskManagerModel::GetAndCacheMemoryMetrics(base::ProcessHandle handle, | 1275 bool TaskManagerModel::GetAndCacheMemoryMetrics(base::ProcessHandle handle, |
| 1275 MemoryUsageEntry* usage) const { | 1276 MemoryUsageEntry* usage) const { |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1326 // Count the number of extensions with background pages (including | 1327 // Count the number of extensions with background pages (including |
| 1327 // incognito). | 1328 // incognito). |
| 1328 count += CountExtensionBackgroundPagesForProfile(profile); | 1329 count += CountExtensionBackgroundPagesForProfile(profile); |
| 1329 if (profile->HasOffTheRecordProfile()) { | 1330 if (profile->HasOffTheRecordProfile()) { |
| 1330 count += CountExtensionBackgroundPagesForProfile( | 1331 count += CountExtensionBackgroundPagesForProfile( |
| 1331 profile->GetOffTheRecordProfile()); | 1332 profile->GetOffTheRecordProfile()); |
| 1332 } | 1333 } |
| 1333 } | 1334 } |
| 1334 return count; | 1335 return count; |
| 1335 } | 1336 } |
| OLD | NEW |