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

Unified Diff: chrome/browser/task_manager.cc

Issue 3137007: Uncrashy TaskManagerBrowserTest.PopulateWebCacheFields (Closed)
Patch Set: Created 10 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/task_manager_browsertest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/task_manager.cc
diff --git a/chrome/browser/task_manager.cc b/chrome/browser/task_manager.cc
index aca532e8fa16d1ee030f4a800c7f198b54b3874a..1364a21140e1178d08fc3dddf46c092c8670b9c0 100644
--- a/chrome/browser/task_manager.cc
+++ b/chrome/browser/task_manager.cc
@@ -58,6 +58,12 @@ int ValueCompare(T value1, T value2) {
}
std::wstring FormatStatsSize(const WebKit::WebCache::ResourceTypeStat& stat) {
+ // TODO(phajdan.jr): Remove this when we fix http://crbug.com/42301 properly.
+ if (static_cast<int64>(stat.size) < 0 ||
+ static_cast<int64>(stat.liveSize) < 0) {
+ return l10n_util::GetString(IDS_TASK_MANAGER_NA_CELL_TEXT);
+ }
+
return l10n_util::GetStringF(IDS_TASK_MANAGER_CACHE_SIZE_CELL_TEXT,
FormatBytes(stat.size, DATA_UNITS_KIBIBYTE, false),
FormatBytes(stat.liveSize, DATA_UNITS_KIBIBYTE, false));
« no previous file with comments | « no previous file | chrome/browser/task_manager_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698