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

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

Issue 11741003: Remove PrefServiceSimple, replacing it with PrefService and PrefRegistrySimple. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 11 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"
11 #include "base/process_util.h" 11 #include "base/process_util.h"
12 #include "base/rand_util.h" 12 #include "base/rand_util.h"
13 #include "base/stl_util.h" 13 #include "base/stl_util.h"
14 #include "base/string_number_conversions.h" 14 #include "base/string_number_conversions.h"
15 #include "base/stringprintf.h" 15 #include "base/stringprintf.h"
16 #include "base/threading/thread.h" 16 #include "base/threading/thread.h"
17 #include "base/utf_string_conversions.h" 17 #include "base/utf_string_conversions.h"
18 #include "chrome/browser/background/background_contents_service.h" 18 #include "chrome/browser/background/background_contents_service.h"
19 #include "chrome/browser/background/background_contents_service_factory.h" 19 #include "chrome/browser/background/background_contents_service_factory.h"
20 #include "chrome/browser/browser_process.h" 20 #include "chrome/browser/browser_process.h"
21 #include "chrome/browser/extensions/extension_host.h" 21 #include "chrome/browser/extensions/extension_host.h"
22 #include "chrome/browser/extensions/extension_process_manager.h" 22 #include "chrome/browser/extensions/extension_process_manager.h"
23 #include "chrome/browser/extensions/extension_system.h" 23 #include "chrome/browser/extensions/extension_system.h"
24 #include "chrome/browser/prefs/pref_registrar_simple.h"
24 #include "chrome/browser/prefs/pref_service.h" 25 #include "chrome/browser/prefs/pref_service.h"
25 #include "chrome/browser/profiles/profile_manager.h" 26 #include "chrome/browser/profiles/profile_manager.h"
26 #include "chrome/browser/task_manager/task_manager_resource_providers.h" 27 #include "chrome/browser/task_manager/task_manager_resource_providers.h"
27 #include "chrome/browser/task_manager/task_manager_worker_resource_provider.h" 28 #include "chrome/browser/task_manager/task_manager_worker_resource_provider.h"
28 #include "chrome/browser/ui/browser_finder.h" 29 #include "chrome/browser/ui/browser_finder.h"
29 #include "chrome/browser/ui/browser_list.h" 30 #include "chrome/browser/ui/browser_list.h"
30 #include "chrome/browser/ui/browser_navigator.h" 31 #include "chrome/browser/ui/browser_navigator.h"
31 #include "chrome/common/pref_names.h" 32 #include "chrome/common/pref_names.h"
32 #include "chrome/common/url_constants.h" 33 #include "chrome/common/url_constants.h"
33 #include "chrome/common/view_type.h" 34 #include "chrome/common/view_type.h"
(...skipping 1180 matching lines...) Expand 10 before | Expand all | Expand 10 after
1214 1215
1215 bool TaskManager::Resource::CanInspect() const { return false; } 1216 bool TaskManager::Resource::CanInspect() const { return false; }
1216 1217
1217 content::WebContents* TaskManager::Resource::GetWebContents() const { 1218 content::WebContents* TaskManager::Resource::GetWebContents() const {
1218 return NULL; 1219 return NULL;
1219 } 1220 }
1220 1221
1221 bool TaskManager::Resource::IsBackground() const { return false; } 1222 bool TaskManager::Resource::IsBackground() const { return false; }
1222 1223
1223 // static 1224 // static
1224 void TaskManager::RegisterPrefs(PrefServiceSimple* prefs) { 1225 void TaskManager::RegisterPrefs(PrefRegistrarSimple* prefs) {
1225 prefs->RegisterDictionaryPref(prefs::kTaskManagerWindowPlacement); 1226 prefs->RegisterDictionaryPref(prefs::kTaskManagerWindowPlacement);
1226 } 1227 }
1227 1228
1228 TaskManager::TaskManager() 1229 TaskManager::TaskManager()
1229 : ALLOW_THIS_IN_INITIALIZER_LIST(model_(new TaskManagerModel(this))) { 1230 : ALLOW_THIS_IN_INITIALIZER_LIST(model_(new TaskManagerModel(this))) {
1230 } 1231 }
1231 1232
1232 TaskManager::~TaskManager() { 1233 TaskManager::~TaskManager() {
1233 } 1234 }
1234 1235
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
1343 // Count the number of extensions with background pages (including 1344 // Count the number of extensions with background pages (including
1344 // incognito). 1345 // incognito).
1345 count += CountExtensionBackgroundPagesForProfile(profile); 1346 count += CountExtensionBackgroundPagesForProfile(profile);
1346 if (profile->HasOffTheRecordProfile()) { 1347 if (profile->HasOffTheRecordProfile()) {
1347 count += CountExtensionBackgroundPagesForProfile( 1348 count += CountExtensionBackgroundPagesForProfile(
1348 profile->GetOffTheRecordProfile()); 1349 profile->GetOffTheRecordProfile());
1349 } 1350 }
1350 } 1351 }
1351 return count; 1352 return count;
1352 } 1353 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698