summaryrefslogtreecommitdiffstats
path: root/base/string_util.h
diff options
context:
space:
mode:
authorthakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-13 04:55:06 +0000
committerthakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-13 04:55:06 +0000
commit022eab67d0b3476ee1d35cb463990170c982429b (patch)
treeb2c5517fa9e5f7a0fd7ac6938f6cac80d250d797 /base/string_util.h
parent40d9ddf8fae7521890415be1eb0d2ad8f18453a9 (diff)
downloadchromium_src-022eab67d0b3476ee1d35cb463990170c982429b.zip
chromium_src-022eab67d0b3476ee1d35cb463990170c982429b.tar.gz
chromium_src-022eab67d0b3476ee1d35cb463990170c982429b.tar.bz2
Mac: UI tweaks for task manager.
Nib change: Reduce row height, make scrollbars smaller. Make text in task manager table slightly smaller. Show in decimal digit for %cpu. Show memory in KB/MB, not always in K. Change update frequency from 1s to 2s to match Activity Monitor's default. (all mac-only. ui team is fine with this.) Finally, turn taskman on. BUG=13156 TEST=Open task manager, look at it. Should look & feel similar to Activity Monitor. Review URL: http://codereview.chromium.org/536038 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@36096 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/string_util.h')
-rw-r--r--base/string_util.h16
1 files changed, 7 insertions, 9 deletions
diff --git a/base/string_util.h b/base/string_util.h
index ee70a16..dd0f8c1 100644
--- a/base/string_util.h
+++ b/base/string_util.h
@@ -339,13 +339,11 @@ inline bool IsWhitespace(wchar_t c) {
return wcschr(kWhitespaceWide, c) != NULL;
}
-// TODO(mpcomplete): Decide if we should change these names to KIBI, etc,
-// or if we should actually use metric units, or leave as is.
enum DataUnits {
DATA_UNITS_BYTE = 0,
- DATA_UNITS_KILOBYTE,
- DATA_UNITS_MEGABYTE,
- DATA_UNITS_GIGABYTE,
+ DATA_UNITS_KIBIBYTE,
+ DATA_UNITS_MEBIBYTE,
+ DATA_UNITS_GIBIBYTE,
};
// Return the unit type that is appropriate for displaying the amount of bytes
@@ -354,13 +352,13 @@ DataUnits GetByteDisplayUnits(int64 bytes);
// Return a byte string in human-readable format, displayed in units appropriate
// specified by 'units', with an optional unit suffix.
-// Ex: FormatBytes(512, DATA_UNITS_KILOBYTE, true) => "0.5 KB"
-// Ex: FormatBytes(10*1024, DATA_UNITS_MEGABYTE, false) => "0.1"
+// Ex: FormatBytes(512, DATA_UNITS_KIBIBYTE, true) => "0.5 KB"
+// Ex: FormatBytes(10*1024, DATA_UNITS_MEBIBYTE, false) => "0.1"
std::wstring FormatBytes(int64 bytes, DataUnits units, bool show_units);
// As above, but with "/s" units.
-// Ex: FormatSpeed(512, DATA_UNITS_KILOBYTE, true) => "0.5 KB/s"
-// Ex: FormatSpeed(10*1024, DATA_UNITS_MEGABYTE, false) => "0.1"
+// Ex: FormatSpeed(512, DATA_UNITS_KIBIBYTE, true) => "0.5 KB/s"
+// Ex: FormatSpeed(10*1024, DATA_UNITS_MEBIBYTE, false) => "0.1"
std::wstring FormatSpeed(int64 bytes, DataUnits units, bool show_units);
// Return a number formated with separators in the user's locale way.