summaryrefslogtreecommitdiffstats
path: root/chrome/common
diff options
context:
space:
mode:
authorjar@chromium.org <jar@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-30 18:05:43 +0000
committerjar@chromium.org <jar@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-30 18:05:43 +0000
commit84973adbbbb48b4c5a12399695a83a09adcf648e (patch)
treed9a55a9befe69fad7cdcf7f9e4307d51e80079e8 /chrome/common
parent8d2b11162425baabd9dc06eaef5b201351cc7700 (diff)
downloadchromium_src-84973adbbbb48b4c5a12399695a83a09adcf648e.zip
chromium_src-84973adbbbb48b4c5a12399695a83a09adcf648e.tar.gz
chromium_src-84973adbbbb48b4c5a12399695a83a09adcf648e.tar.bz2
Use HTTP status return code to make SDCH handling more robust.
At least one proxy replaces the SDCH content with an error page (of HTML, without SDCH compression). We can identify that scenario by spotting the 40x HTTP return code (and the fact that the content is not SDCH encoded, even though we advertised SDCH and a dictionary to the server). This change list adds the ability to access the return code via the FilterContext. The bulk of the change is centered on getting that access method to be const in all derived classes. bug=8916 r=wtc,huanr,openvcdiff Review URL: http://codereview.chromium.org/56043 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12784 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common')
-rw-r--r--chrome/common/net/url_request_intercept_job.cc2
-rw-r--r--chrome/common/net/url_request_intercept_job.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/chrome/common/net/url_request_intercept_job.cc b/chrome/common/net/url_request_intercept_job.cc
index fb1f15b..b584de6 100644
--- a/chrome/common/net/url_request_intercept_job.cc
+++ b/chrome/common/net/url_request_intercept_job.cc
@@ -151,7 +151,7 @@ void URLRequestInterceptJob::GetResponseInfo(net::HttpResponseInfo* info) {
}
}
-int URLRequestInterceptJob::GetResponseCode() {
+int URLRequestInterceptJob::GetResponseCode() const {
if (!plugin_)
return -1;
diff --git a/chrome/common/net/url_request_intercept_job.h b/chrome/common/net/url_request_intercept_job.h
index 06a9cdd..d15b62a 100644
--- a/chrome/common/net/url_request_intercept_job.h
+++ b/chrome/common/net/url_request_intercept_job.h
@@ -40,7 +40,7 @@ class URLRequestInterceptJob
virtual bool GetMimeType(std::string* mime_type) const;
virtual bool GetCharset(std::string* charset);
virtual void GetResponseInfo(net::HttpResponseInfo* info);
- virtual int GetResponseCode();
+ virtual int GetResponseCode() const;
virtual bool GetContentEncoding(std::string* encoding_type);
virtual bool IsRedirectResponse(GURL* location, int* http_status_code);