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

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: Use GetSuggestedFilename 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..21e56ac92e17c314ba49d5f1bca21a0348a32816 100644
--- a/net/filter/mock_filter_context.h
+++ b/net/filter/mock_filter_context.h
@@ -19,6 +19,9 @@ class MockFilterContext : public FilterContext {
void SetMimeType(const std::string& mime_type) { mime_type_ = mime_type; }
void SetURL(const GURL& gurl) { gurl_ = gurl; }
+ void SetContentDisposition(const std::string& disposition) {
+ content_disposition_ = disposition;
+ }
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 +36,10 @@ class MockFilterContext : public FilterContext {
// Return false if gurl is not present.
virtual bool GetURL(GURL* gurl) const OVERRIDE;
+ // What Content-Disposition did the server supply for this data?
+ // Return false if Content-Disposition was not present.
+ virtual bool GetContentDisposition(std::string* disposition) const OVERRIDE;
+
// What was this data requested from a server?
virtual base::Time GetRequestTime() const OVERRIDE;
@@ -55,6 +62,7 @@ class MockFilterContext : public FilterContext {
private:
int buffer_size_;
std::string mime_type_;
+ std::string content_disposition_;
GURL gurl_;
base::Time request_time_;
bool is_cached_content_;

Powered by Google App Engine
This is Rietveld 408576698