Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(309)

Unified Diff: net/base/filter_unittest.h

Issue 56043: Use HTTP status return code to make SDCH handling more robust... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/base/filter.h ('k') | net/base/gzip_filter_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/filter_unittest.h
===================================================================
--- net/base/filter_unittest.h (revision 12762)
+++ net/base/filter_unittest.h (working copy)
@@ -17,7 +17,8 @@
explicit MockFilterContext(int buffer_size)
: buffer_size_(buffer_size),
is_cached_content_(false),
- is_sdch_response_(false) {
+ is_sdch_response_(false),
+ response_code_(-1) {
}
void SetBufferSize(int buffer_size) { buffer_size_ = buffer_size; }
@@ -25,6 +26,7 @@
void SetURL(const GURL& gurl) { gurl_ = gurl; }
void SetRequestTime(const base::Time time) { request_time_ = time; }
void SetCached(bool is_cached) { is_cached_content_ = is_cached; }
+ void SetResponseCode(int response_code) { response_code_ = response_code; }
void SetSdchResponse(bool is_sdch_response) {
is_sdch_response_ = is_sdch_response;
}
@@ -55,6 +57,8 @@
// How many bytes were fed to filter(s) so far?
virtual int64 GetByteReadCount() const { return 0; }
+ virtual int GetResponseCode() const { return response_code_; }
+
// What is the desirable input buffer size for these filters?
virtual int GetInputStreamBufferSize() const { return buffer_size_; }
@@ -66,6 +70,7 @@
base::Time request_time_;
bool is_cached_content_;
bool is_sdch_response_;
+ int response_code_;
DISALLOW_COPY_AND_ASSIGN(MockFilterContext);
};
« no previous file with comments | « net/base/filter.h ('k') | net/base/gzip_filter_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698