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

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

Issue 6905044: Refactor preference syncing. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Self review Created 9 years, 7 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/compiler_specific.h" 7 #include "base/compiler_specific.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/process_util.h" 10 #include "base/process_util.h"
(...skipping 881 matching lines...) Expand 10 before | Expand all | Expand 10 after
892 *proc_metrics = iter->second; 892 *proc_metrics = iter->second;
893 return true; 893 return true;
894 } 894 }
895 895
896 //////////////////////////////////////////////////////////////////////////////// 896 ////////////////////////////////////////////////////////////////////////////////
897 // TaskManager class 897 // TaskManager class
898 //////////////////////////////////////////////////////////////////////////////// 898 ////////////////////////////////////////////////////////////////////////////////
899 899
900 // static 900 // static
901 void TaskManager::RegisterPrefs(PrefService* prefs) { 901 void TaskManager::RegisterPrefs(PrefService* prefs) {
902 prefs->RegisterDictionaryPref(prefs::kTaskManagerWindowPlacement); 902 prefs->RegisterDictionaryPref(prefs::kTaskManagerWindowPlacement,
903 false /* don't sync pref */);
903 } 904 }
904 905
905 TaskManager::TaskManager() 906 TaskManager::TaskManager()
906 : ALLOW_THIS_IN_INITIALIZER_LIST(model_(new TaskManagerModel(this))) { 907 : ALLOW_THIS_IN_INITIALIZER_LIST(model_(new TaskManagerModel(this))) {
907 } 908 }
908 909
909 TaskManager::~TaskManager() { 910 TaskManager::~TaskManager() {
910 } 911 }
911 912
912 bool TaskManager::IsBrowserProcess(int index) const { 913 bool TaskManager::IsBrowserProcess(int index) const {
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
995 MetricsMap::const_iterator iter = metrics_map_.find(handle); 996 MetricsMap::const_iterator iter = metrics_map_.find(handle);
996 if (iter == metrics_map_.end()) 997 if (iter == metrics_map_.end())
997 return false; 998 return false;
998 999
999 if (!iter->second->GetMemoryBytes(&usage->first, &usage->second)) 1000 if (!iter->second->GetMemoryBytes(&usage->first, &usage->second))
1000 return false; 1001 return false;
1001 1002
1002 memory_usage_map_.insert(std::make_pair(handle, *usage)); 1003 memory_usage_map_.insert(std::make_pair(handle, *usage));
1003 return true; 1004 return true;
1004 } 1005 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698