#include "components/filename_generation/filename_generation.h"
#include "base/check.h"
#include "base/files/file_path.h"
#include "base/files/file_util.h"
#include "base/i18n/file_util_icu.h"
#include "base/strings/string_util.h"
#include "base/strings/sys_string_conversions.h"
#include "base/strings/utf_string_conversions.h"
#include "base/third_party/icu/icu_utf.h"
#include "build/build_config.h"
#include "build/chromeos_buildflags.h"
#include "components/url_formatter/url_formatter.h"
#include "net/base/filename_util.h"
#include "net/base/mime_util.h"
#include "url/gurl.h"
namespace filename_generation {
namespace {
const size_t kTruncatedNameLengthLowerbound = …;
const base::FilePath::CharType kDefaultHtmlExtension[] = …);
bool CanSaveAsComplete(const std::string& contents_mime_type) { … }
}
const base::FilePath::CharType* ExtensionForMimeType(
const std::string& contents_mime_type) { … }
base::FilePath EnsureHtmlExtension(const base::FilePath& name) { … }
base::FilePath EnsureMimeExtension(const base::FilePath& name,
const std::string& contents_mime_type) { … }
base::FilePath GenerateFilename(const std::u16string& title,
const GURL& url,
bool can_save_as_complete,
std::string contents_mime_type) { … }
bool TruncateFilename(base::FilePath* path, size_t limit) { … }
}