| OLD | NEW |
| 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 542 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 553 | 553 |
| 554 bool TaskManagerModel::GetV8Memory(int index, size_t* result) const { | 554 bool TaskManagerModel::GetV8Memory(int index, size_t* result) const { |
| 555 *result = 0; | 555 *result = 0; |
| 556 if (!resources_[index]->ReportsV8MemoryStats()) | 556 if (!resources_[index]->ReportsV8MemoryStats()) |
| 557 return false; | 557 return false; |
| 558 | 558 |
| 559 *result = resources_[index]->GetV8MemoryAllocated(); | 559 *result = resources_[index]->GetV8MemoryAllocated(); |
| 560 return true; | 560 return true; |
| 561 } | 561 } |
| 562 | 562 |
| 563 bool TaskManagerModel::CanInspect(int index) const { |
| 564 return resources_[index]->CanInspect(); |
| 565 } |
| 566 |
| 567 void TaskManagerModel::Inspect(int index) const { |
| 568 resources_[index]->Inspect(); |
| 569 } |
| 570 |
| 563 int TaskManagerModel::GetGoatsTeleported(int index) const { | 571 int TaskManagerModel::GetGoatsTeleported(int index) const { |
| 564 int seed = goat_salt_ * (index + 1); | 572 int seed = goat_salt_ * (index + 1); |
| 565 return (seed >> 16) & 255; | 573 return (seed >> 16) & 255; |
| 566 } | 574 } |
| 567 | 575 |
| 568 string16 TaskManagerModel::GetMemCellText(int64 number) const { | 576 string16 TaskManagerModel::GetMemCellText(int64 number) const { |
| 569 #if !defined(OS_MACOSX) | 577 #if !defined(OS_MACOSX) |
| 570 string16 str = base::FormatNumber(number / 1024); | 578 string16 str = base::FormatNumber(number / 1024); |
| 571 | 579 |
| 572 // Adjust number string if necessary. | 580 // Adjust number string if necessary. |
| (...skipping 546 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1119 // Count the number of extensions with background pages (including | 1127 // Count the number of extensions with background pages (including |
| 1120 // incognito). | 1128 // incognito). |
| 1121 count += CountExtensionBackgroundPagesForProfile(profile); | 1129 count += CountExtensionBackgroundPagesForProfile(profile); |
| 1122 if (profile->HasOffTheRecordProfile()) { | 1130 if (profile->HasOffTheRecordProfile()) { |
| 1123 count += CountExtensionBackgroundPagesForProfile( | 1131 count += CountExtensionBackgroundPagesForProfile( |
| 1124 profile->GetOffTheRecordProfile()); | 1132 profile->GetOffTheRecordProfile()); |
| 1125 } | 1133 } |
| 1126 } | 1134 } |
| 1127 return count; | 1135 return count; |
| 1128 } | 1136 } |
| OLD | NEW |