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

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

Issue 2435603002: [WeakMemoryCache] Remove dead/live distinction of Resource outside core/fetch (Closed)
Patch Set: Rebase Created 4 years 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/ui/task_manager/task_manager_table_model.h" 5 #include "chrome/browser/ui/task_manager/task_manager_table_model.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/i18n/number_formatting.h" 10 #include "base/i18n/number_formatting.h"
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 184
185 base::string16 FormatAllocatedAndUsedMemory(int64_t allocated, int64_t used) { 185 base::string16 FormatAllocatedAndUsedMemory(int64_t allocated, int64_t used) {
186 return l10n_util::GetStringFUTF16( 186 return l10n_util::GetStringFUTF16(
187 IDS_TASK_MANAGER_CACHE_SIZE_CELL_TEXT, 187 IDS_TASK_MANAGER_CACHE_SIZE_CELL_TEXT,
188 ui::FormatBytesWithUnits(allocated, ui::DATA_UNITS_KIBIBYTE, false), 188 ui::FormatBytesWithUnits(allocated, ui::DATA_UNITS_KIBIBYTE, false),
189 ui::FormatBytesWithUnits(used, ui::DATA_UNITS_KIBIBYTE, false)); 189 ui::FormatBytesWithUnits(used, ui::DATA_UNITS_KIBIBYTE, false));
190 } 190 }
191 191
192 base::string16 GetWebCacheStatText( 192 base::string16 GetWebCacheStatText(
193 const blink::WebCache::ResourceTypeStat& stat) { 193 const blink::WebCache::ResourceTypeStat& stat) {
194 return FormatAllocatedAndUsedMemory(stat.size, stat.liveSize); 194 return GetMemoryUsageText(stat.size, false);
195 } 195 }
196 196
197 const base::string16& n_a_string() const { return n_a_string_; } 197 const base::string16& n_a_string() const { return n_a_string_; }
198 const base::string16& zero_string() const { return zero_string_; } 198 const base::string16& zero_string() const { return zero_string_; }
199 const base::string16& backgrounded_string() const { 199 const base::string16& backgrounded_string() const {
200 return backgrounded_string_; 200 return backgrounded_string_;
201 } 201 }
202 const base::string16& foregrounded_string() const { 202 const base::string16& foregrounded_string() const {
203 return foregrounded_string_; 203 return foregrounded_string_;
204 } 204 }
(...skipping 627 matching lines...) Expand 10 before | Expand all | Expand 10 after
832 832
833 bool TaskManagerTableModel::IsTaskFirstInGroup(int row_index) const { 833 bool TaskManagerTableModel::IsTaskFirstInGroup(int row_index) const {
834 if (row_index == 0) 834 if (row_index == 0)
835 return true; 835 return true;
836 836
837 return observed_task_manager()->GetProcessId(tasks_[row_index - 1]) != 837 return observed_task_manager()->GetProcessId(tasks_[row_index - 1]) !=
838 observed_task_manager()->GetProcessId(tasks_[row_index]); 838 observed_task_manager()->GetProcessId(tasks_[row_index]);
839 } 839 }
840 840
841 } // namespace task_manager 841 } // namespace task_manager
OLDNEW
« no previous file with comments | « chrome/browser/renderer_host/chrome_render_message_filter.cc ('k') | chrome/common/render_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698