chromium/ui/base/text/bytes_formatting.cc

// Copyright 2011 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifdef UNSAFE_BUFFERS_BUILD
// TODO(crbug.com/40285824): Remove this and convert code to safer constructs.
#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 {

// Byte suffix string constants. These both must match the DataUnits enum.
const int kByteStrings[] =;

const int kSpeedStrings[] =;

std::u16string FormatBytesInternal(int64_t bytes,
                                   DataUnits units,
                                   bool show_units,
                                   const int* const suffix) {}

}  // namespace

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) {}

}  // namespace ui