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

Unified Diff: net/filter/mock_filter_context.h

Issue 206503006: Fix content-encoding handling with buggy servers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lkgr
Patch Set: Created 6 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
Index: net/filter/mock_filter_context.h
diff --git a/net/filter/mock_filter_context.h b/net/filter/mock_filter_context.h
index 00fc8ed6ce3413f72bd2e9f81b91baf76da2f157..cf4652c0718f2dc0882ecd5a526e94801231b5c1 100644
--- a/net/filter/mock_filter_context.h
+++ b/net/filter/mock_filter_context.h
@@ -19,6 +19,7 @@ class MockFilterContext : public FilterContext {
void SetMimeType(const std::string& mime_type) { mime_type_ = mime_type; }
void SetURL(const GURL& gurl) { gurl_ = gurl; }
+ void SetFilename(const std::string& filename) { filename_ = filename; }
void SetRequestTime(const base::Time time) { request_time_ = time; }
void SetCached(bool is_cached) { is_cached_content_ = is_cached; }
void SetDownload(bool is_download) { is_download_ = is_download; }
@@ -33,6 +34,10 @@ class MockFilterContext : public FilterContext {
// Return false if gurl is not present.
virtual bool GetURL(GURL* gurl) const OVERRIDE;
+ // What filename did the server say to use for this data?
+ // Return false if filename is not present.
+ virtual bool GetFilename(std::string* filename) const OVERRIDE;
+
// What was this data requested from a server?
virtual base::Time GetRequestTime() const OVERRIDE;
@@ -55,6 +60,7 @@ class MockFilterContext : public FilterContext {
private:
int buffer_size_;
std::string mime_type_;
+ std::string filename_;
GURL gurl_;
base::Time request_time_;
bool is_cached_content_;

Powered by Google App Engine
This is Rietveld 408576698