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

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

Issue 63153003: mac: Prepare for -Wunused-functions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 1 month 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/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 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 if (DuplicateHandle(current_process, process, current_process, 147 if (DuplicateHandle(current_process, process, current_process,
148 &process_with_query_rights, PROCESS_QUERY_INFORMATION, 148 &process_with_query_rights, PROCESS_QUERY_INFORMATION,
149 false, 0)) { 149 false, 0)) {
150 *current = GetGuiResources(process_with_query_rights, GR_USEROBJECTS); 150 *current = GetGuiResources(process_with_query_rights, GR_USEROBJECTS);
151 *peak = GetGuiResources(process_with_query_rights, GR_USEROBJECTS_PEAK); 151 *peak = GetGuiResources(process_with_query_rights, GR_USEROBJECTS_PEAK);
152 CloseHandle(process_with_query_rights); 152 CloseHandle(process_with_query_rights);
153 } 153 }
154 } 154 }
155 #endif 155 #endif
156 156
157 // Counts the number of extension background pages associated with this profile.
158 int CountExtensionBackgroundPagesForProfile(Profile* profile) {
159 int count = 0;
160 ExtensionProcessManager* manager =
161 extensions::ExtensionSystem::Get(profile)->process_manager();
162 if (!manager)
163 return count;
164
165 const ExtensionProcessManager::ExtensionHostSet& background_hosts =
166 manager->background_hosts();
167 for (ExtensionProcessManager::const_iterator iter = background_hosts.begin();
168 iter != background_hosts.end(); ++iter) {
169 ++count;
170 }
171 return count;
172 }
173
174 } // namespace 157 } // namespace
175 158
176 class TaskManagerModelGpuDataManagerObserver 159 class TaskManagerModelGpuDataManagerObserver
177 : public content::GpuDataManagerObserver { 160 : public content::GpuDataManagerObserver {
178 public: 161 public:
179 TaskManagerModelGpuDataManagerObserver() { 162 TaskManagerModelGpuDataManagerObserver() {
180 content::GpuDataManager::GetInstance()->AddObserver(this); 163 content::GpuDataManager::GetInstance()->AddObserver(this);
181 } 164 }
182 165
183 virtual ~TaskManagerModelGpuDataManagerObserver() { 166 virtual ~TaskManagerModelGpuDataManagerObserver() {
(...skipping 1374 matching lines...) Expand 10 before | Expand all | Expand 10 after
1558 params.host_desktop_type = desktop_type; 1541 params.host_desktop_type = desktop_type;
1559 chrome::Navigate(&params); 1542 chrome::Navigate(&params);
1560 } 1543 }
1561 1544
1562 TaskManager::TaskManager() 1545 TaskManager::TaskManager()
1563 : model_(new TaskManagerModel(this)) { 1546 : model_(new TaskManagerModel(this)) {
1564 } 1547 }
1565 1548
1566 TaskManager::~TaskManager() { 1549 TaskManager::~TaskManager() {
1567 } 1550 }
OLDNEW
« no previous file with comments | « chrome/browser/storage_monitor/media_storage_util.cc ('k') | chrome/browser/themes/theme_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698