| OLD | NEW |
| 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 446 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 457 return 0; | 457 return 0; |
| 458 } | 458 } |
| 459 } | 459 } |
| 460 | 460 |
| 461 base::ProcessHandle TaskManagerModel::GetResourceProcessHandle(int index) | 461 base::ProcessHandle TaskManagerModel::GetResourceProcessHandle(int index) |
| 462 const { | 462 const { |
| 463 CHECK_LT(index, ResourceCount()); | 463 CHECK_LT(index, ResourceCount()); |
| 464 return resources_[index]->GetProcess(); | 464 return resources_[index]->GetProcess(); |
| 465 } | 465 } |
| 466 | 466 |
| 467 int TaskManagerModel::GetUniqueChildProcessId(int index) const { |
| 468 CHECK_LT(index, ResourceCount()); |
| 469 return resources_[index]->GetUniqueChildProcessId(); |
| 470 } |
| 471 |
| 467 TaskManager::Resource::Type TaskManagerModel::GetResourceType(int index) const { | 472 TaskManager::Resource::Type TaskManagerModel::GetResourceType(int index) const { |
| 468 CHECK_LT(index, ResourceCount()); | 473 CHECK_LT(index, ResourceCount()); |
| 469 return resources_[index]->GetType(); | 474 return resources_[index]->GetType(); |
| 470 } | 475 } |
| 471 | 476 |
| 472 TabContentsWrapper* TaskManagerModel::GetResourceTabContents(int index) const { | 477 TabContentsWrapper* TaskManagerModel::GetResourceTabContents(int index) const { |
| 473 CHECK_LT(index, ResourceCount()); | 478 CHECK_LT(index, ResourceCount()); |
| 474 return resources_[index]->GetTabContents(); | 479 return resources_[index]->GetTabContents(); |
| 475 } | 480 } |
| 476 | 481 |
| (...skipping 684 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1161 // Count the number of extensions with background pages (including | 1166 // Count the number of extensions with background pages (including |
| 1162 // incognito). | 1167 // incognito). |
| 1163 count += CountExtensionBackgroundPagesForProfile(profile); | 1168 count += CountExtensionBackgroundPagesForProfile(profile); |
| 1164 if (profile->HasOffTheRecordProfile()) { | 1169 if (profile->HasOffTheRecordProfile()) { |
| 1165 count += CountExtensionBackgroundPagesForProfile( | 1170 count += CountExtensionBackgroundPagesForProfile( |
| 1166 profile->GetOffTheRecordProfile()); | 1171 profile->GetOffTheRecordProfile()); |
| 1167 } | 1172 } |
| 1168 } | 1173 } |
| 1169 return count; | 1174 return count; |
| 1170 } | 1175 } |
| OLD | NEW |