Update to API changes of Chrome 47
This commit is contained in:
parent
5d8167afd6
commit
75d0bc848d
21 changed files with 103 additions and 59 deletions
|
@ -30,19 +30,25 @@ std::string PathWithoutParams(const std::string& path) {
|
|||
|
||||
std::string GetMimeTypeForPath(const std::string& path) {
|
||||
std::string filename = PathWithoutParams(path);
|
||||
if (base::EndsWith(filename, ".html", false)) {
|
||||
if (base::EndsWith(filename, ".html", base::CompareCase::INSENSITIVE_ASCII)) {
|
||||
return "text/html";
|
||||
} else if (base::EndsWith(filename, ".css", false)) {
|
||||
} else if (base::EndsWith(filename, ".css",
|
||||
base::CompareCase::INSENSITIVE_ASCII)) {
|
||||
return "text/css";
|
||||
} else if (base::EndsWith(filename, ".js", false)) {
|
||||
} else if (base::EndsWith(filename, ".js",
|
||||
base::CompareCase::INSENSITIVE_ASCII)) {
|
||||
return "application/javascript";
|
||||
} else if (base::EndsWith(filename, ".png", false)) {
|
||||
} else if (base::EndsWith(filename, ".png",
|
||||
base::CompareCase::INSENSITIVE_ASCII)) {
|
||||
return "image/png";
|
||||
} else if (base::EndsWith(filename, ".gif", false)) {
|
||||
} else if (base::EndsWith(filename, ".gif",
|
||||
base::CompareCase::INSENSITIVE_ASCII)) {
|
||||
return "image/gif";
|
||||
} else if (base::EndsWith(filename, ".svg", false)) {
|
||||
} else if (base::EndsWith(filename, ".svg",
|
||||
base::CompareCase::INSENSITIVE_ASCII)) {
|
||||
return "image/svg+xml";
|
||||
} else if (base::EndsWith(filename, ".manifest", false)) {
|
||||
} else if (base::EndsWith(filename, ".manifest",
|
||||
base::CompareCase::INSENSITIVE_ASCII)) {
|
||||
return "text/cache-manifest";
|
||||
}
|
||||
return "text/html";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue