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

Unified Diff: net/base/filter_unittest.h

Issue 62111: Give the filter setup more context so it can figure out whether it's download... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 8 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/base/filter_unittest.h
===================================================================
--- net/base/filter_unittest.h (revision 13526)
+++ net/base/filter_unittest.h (working copy)
@@ -17,6 +17,7 @@
explicit MockFilterContext(int buffer_size)
: buffer_size_(buffer_size),
is_cached_content_(false),
+ is_download_(false),
is_sdch_response_(false),
response_code_(-1) {
}
@@ -26,6 +27,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 SetDownload(bool is_download) { is_download_ = is_download; }
void SetResponseCode(int response_code) { response_code_ = response_code; }
void SetSdchResponse(bool is_sdch_response) {
is_sdch_response_ = is_sdch_response;
@@ -51,6 +53,9 @@
// Is data supplied from cache, or fresh across the net?
virtual bool IsCachedContent() const { return is_cached_content_; }
+ // Is this a download?
+ virtual bool IsDownload() const { return is_download_; }
+
// Was this data flagged as a response to a request with an SDCH dictionary?
virtual bool IsSdchResponse() const { return is_sdch_response_; }
@@ -69,6 +74,7 @@
GURL gurl_;
base::Time request_time_;
bool is_cached_content_;
+ bool is_download_;
bool is_sdch_response_;
int response_code_;

Powered by Google App Engine
This is Rietveld 408576698