Merge pull request #110 from aroben/devtools-security
Make devtools work when web security is enabled
This commit is contained in:
commit
239ddea0ce
1 changed files with 11 additions and 2 deletions
|
@ -42,11 +42,12 @@ std::string GetMimeTypeForPath(const std::string& path) {
|
||||||
return "image/png";
|
return "image/png";
|
||||||
} else if (EndsWith(filename, ".gif", false)) {
|
} else if (EndsWith(filename, ".gif", false)) {
|
||||||
return "image/gif";
|
return "image/gif";
|
||||||
|
} else if (EndsWith(filename, ".svg", false)) {
|
||||||
|
return "image/svg+xml";
|
||||||
} else if (EndsWith(filename, ".manifest", false)) {
|
} else if (EndsWith(filename, ".manifest", false)) {
|
||||||
return "text/cache-manifest";
|
return "text/cache-manifest";
|
||||||
}
|
}
|
||||||
NOTREACHED();
|
return "text/html";
|
||||||
return "text/plain";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
class BundledDataSource : public content::URLDataSource {
|
class BundledDataSource : public content::URLDataSource {
|
||||||
|
@ -86,6 +87,14 @@ class BundledDataSource : public content::URLDataSource {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
virtual bool ShouldDenyXFrameOptions() const override {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
virtual bool ShouldServeMimeTypeAsContentTypeHeader() const override {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
virtual ~BundledDataSource() {}
|
virtual ~BundledDataSource() {}
|
||||||
DISALLOW_COPY_AND_ASSIGN(BundledDataSource);
|
DISALLOW_COPY_AND_ASSIGN(BundledDataSource);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue