Commit 54a4e404 authored by rob's avatar rob Committed by Commit bot

Override IsRedirectResponse in extension protocols

The default URLFileRequestJob::IsRedirectResponse implementation is incorrect
for URLRequestExtensionJob (chrome-extension:-scheme) and ExtensionResourcesJob (chrome-extension-resource:-scheme).

BUG=388852,424961

Review URL: https://codereview.chromium.org/650453003

Cr-Commit-Position: refs/heads/master@{#300329}
parent af0a41c8
...@@ -35,6 +35,9 @@ class ExtensionResourcesJob : public net::URLRequestFileJob { ...@@ -35,6 +35,9 @@ class ExtensionResourcesJob : public net::URLRequestFileJob {
virtual void Start() override; virtual void Start() override;
virtual bool IsRedirectResponse(GURL* location,
int* http_status_code) override;
protected: protected:
virtual ~ExtensionResourcesJob() {} virtual ~ExtensionResourcesJob() {}
...@@ -57,6 +60,11 @@ void ExtensionResourcesJob::Start() { ...@@ -57,6 +60,11 @@ void ExtensionResourcesJob::Start() {
weak_ptr_factory_.GetWeakPtr())); weak_ptr_factory_.GetWeakPtr()));
} }
bool ExtensionResourcesJob::IsRedirectResponse(GURL* location,
int* http_status_code) {
return false;
}
void ExtensionResourcesJob::ResolvePathDone( void ExtensionResourcesJob::ResolvePathDone(
const base::FilePath& resolved_path) { const base::FilePath& resolved_path) {
DCHECK(thread_checker_.CalledOnValidThread()); DCHECK(thread_checker_.CalledOnValidThread());
......
...@@ -220,6 +220,11 @@ class URLRequestExtensionJob : public net::URLRequestFileJob { ...@@ -220,6 +220,11 @@ class URLRequestExtensionJob : public net::URLRequestFileJob {
DCHECK(posted); DCHECK(posted);
} }
virtual bool IsRedirectResponse(GURL* location,
int* http_status_code) override {
return false;
}
virtual void SetExtraRequestHeaders( virtual void SetExtraRequestHeaders(
const net::HttpRequestHeaders& headers) override { const net::HttpRequestHeaders& headers) override {
// TODO(asargent) - we'll need to add proper support for range headers. // TODO(asargent) - we'll need to add proper support for range headers.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment