Fix compilation on Windows

This commit is contained in:
Cheng Zhao 2017-12-22 11:29:09 +09:00
parent 237bd6790b
commit 1043f07b42

View file

@ -78,8 +78,8 @@ class BundledDataSource : public content::URLDataSource {
}
std::string GetMimeType(const std::string& path) const override {
auto file = base::FilePath(PathWithoutParams(path));
base::FilePath::StringType ext = file.Extension();
base::FilePath::StringType ext =
base::FilePath::FromUTF8Unsafe(PathWithoutParams(path)).Extension();
std::string mime_type;
if (!ext.empty() &&
net::GetWellKnownMimeTypeFromExtension(ext.substr(1), &mime_type))