Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(218)

Side by Side Diff: chrome/browser/task_manager/task_manager.cc

Issue 10967003: Add desktop type context to most existing instances of FindTabbedBrowser. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Moving check_deps exception to specific_include_rules after chat with Kai. Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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(&params); 1272 chrome::Navigate(&params);
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
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 }
OLDNEW
« no previous file with comments | « chrome/browser/protector/settings_change_global_error.cc ('k') | chrome/browser/ui/ash/chrome_shell_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698