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

Unified Diff: net/url_request/url_request_job.cc

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
« net/url_request/url_request_job.h ('K') | « net/url_request/url_request_job.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/url_request/url_request_job.cc
===================================================================
--- net/url_request/url_request_job.cc (revision 13526)
+++ net/url_request/url_request_job.cc (working copy)
@@ -9,6 +9,7 @@
#include "googleurl/src/gurl.h"
#include "net/base/auth.h"
#include "net/base/io_buffer.h"
+#include "net/base/load_flags.h"
#include "net/base/net_errors.h"
#include "net/url_request/url_request.h"
#include "net/url_request/url_request_job_metrics.h"
@@ -30,6 +31,7 @@
has_handled_response_(false),
expected_content_size_(-1),
filter_input_byte_count_(0) {
+ load_flags_ = request_->load_flags();
is_profiling_ = request->enable_profiling();
if (is_profiling()) {
metrics_.reset(new URLRequestJobMetrics());
@@ -53,6 +55,10 @@
request_ = NULL;
}
+bool URLRequestJob::IsDownload() const {
+ return (load_flags_ & net::LOAD_IS_DOWNLOAD) != 0;
+}
+
void URLRequestJob::SetupFilter() {
std::vector<Filter::FilterType> encoding_types;
if (GetContentEncodings(&encoding_types)) {
« net/url_request/url_request_job.h ('K') | « net/url_request/url_request_job.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698