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

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: Update production interfaces based on review comments. Created 7 years, 10 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_registry_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 1331 matching lines...) Expand 10 before | Expand all | Expand 10 after
1365 1366
1366 bool TaskManager::Resource::CanInspect() const { return false; } 1367 bool TaskManager::Resource::CanInspect() const { return false; }
1367 1368
1368 content::WebContents* TaskManager::Resource::GetWebContents() const { 1369 content::WebContents* TaskManager::Resource::GetWebContents() const {
1369 return NULL; 1370 return NULL;
1370 } 1371 }
1371 1372
1372 bool TaskManager::Resource::IsBackground() const { return false; } 1373 bool TaskManager::Resource::IsBackground() const { return false; }
1373 1374
1374 // static 1375 // static
1375 void TaskManager::RegisterPrefs(PrefServiceSimple* prefs) { 1376 void TaskManager::RegisterPrefs(PrefRegistrySimple* prefs) {
1376 prefs->RegisterDictionaryPref(prefs::kTaskManagerWindowPlacement); 1377 prefs->RegisterDictionaryPref(prefs::kTaskManagerWindowPlacement);
1377 } 1378 }
1378 1379
1379 bool TaskManager::IsBrowserProcess(int index) const { 1380 bool TaskManager::IsBrowserProcess(int index) const {
1380 // If some of the selection is out of bounds, ignore. This may happen when 1381 // If some of the selection is out of bounds, ignore. This may happen when
1381 // killing a process that manages several pages. 1382 // killing a process that manages several pages.
1382 return index < model_->ResourceCount() && 1383 return index < model_->ResourceCount() &&
1383 model_->GetProcess(index) == base::GetCurrentProcessHandle(); 1384 model_->GetProcess(index) == base::GetCurrentProcessHandle();
1384 } 1385 }
1385 1386
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
1480 } 1481 }
1481 return count; 1482 return count;
1482 } 1483 }
1483 1484
1484 TaskManager::TaskManager() 1485 TaskManager::TaskManager()
1485 : ALLOW_THIS_IN_INITIALIZER_LIST(model_(new TaskManagerModel(this))) { 1486 : ALLOW_THIS_IN_INITIALIZER_LIST(model_(new TaskManagerModel(this))) {
1486 } 1487 }
1487 1488
1488 TaskManager::~TaskManager() { 1489 TaskManager::~TaskManager() {
1489 } 1490 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698