#include "net/base/platform_mime_util.h"
#include <string>
#include "build/build_config.h"
#include "build/chromeos_buildflags.h"
#if BUILDFLAG(IS_ANDROID)
#include "net/android/network_library.h"
#else
#include "base/nix/mime_util_xdg.h"
#endif
namespace net {
#if BUILDFLAG(IS_ANDROID)
bool PlatformMimeUtil::GetPlatformMimeTypeFromExtension(
const base::FilePath::StringType& ext,
std::string* result) const {
return android::GetMimeTypeFromExtension(ext, result);
}
#else
bool PlatformMimeUtil::GetPlatformMimeTypeFromExtension(
const base::FilePath::StringType& ext,
std::string* result) const { … }
#endif
bool PlatformMimeUtil::GetPlatformPreferredExtensionForMimeType(
const std::string& mime_type,
base::FilePath::StringType* ext) const { … }
void PlatformMimeUtil::GetPlatformExtensionsForMimeType(
const std::string& mime_type,
std::unordered_set<base::FilePath::StringType>* extensions) const { … }
}