#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "ui/base/text/bytes_formatting.h"
#include <ostream>
#include "base/check.h"
#include "base/i18n/number_formatting.h"
#include "base/notreached.h"
#include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/strings/grit/ui_strings.h"
namespace ui {
namespace {
const int kByteStrings[] = …;
const int kSpeedStrings[] = …;
std::u16string FormatBytesInternal(int64_t bytes,
DataUnits units,
bool show_units,
const int* const suffix) { … }
}
DataUnits GetByteDisplayUnits(int64_t bytes) { … }
std::u16string FormatBytesWithUnits(int64_t bytes,
DataUnits units,
bool show_units) { … }
std::u16string FormatSpeedWithUnits(int64_t bytes,
DataUnits units,
bool show_units) { … }
std::u16string FormatBytes(int64_t bytes) { … }
std::u16string FormatSpeed(int64_t bytes) { … }
}