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

Unified Diff: net/url_request/url_request_job.cc

Issue 737943002: Update from https://crrev.com/304715 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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/url_request/url_fetcher_core.cc ('k') | net/websockets/websocket_stream.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/url_request/url_request_job.cc
diff --git a/net/url_request/url_request_job.cc b/net/url_request/url_request_job.cc
index 36101953c6c6c2966cbb29d83b80231d79200868..5d32c6f78447b4d5439b82793e79ec5c3df94cf8 100644
--- a/net/url_request/url_request_job.cc
+++ b/net/url_request/url_request_job.cc
@@ -11,6 +11,7 @@
#include "base/profiler/scoped_tracker.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_util.h"
+#include "base/values.h"
#include "net/base/auth.h"
#include "net/base/host_port_pair.h"
#include "net/base/io_buffer.h"
@@ -21,6 +22,18 @@
#include "net/http/http_response_headers.h"
#include "net/url_request/url_request.h"
+namespace {
+
+// Callback for TYPE_URL_REQUEST_FILTERS_SET net-internals event.
+base::Value* FiltersSetCallback(net::Filter* filter,
+ enum net::NetLog::LogLevel /* log_level */) {
+ base::DictionaryValue* event_params = new base::DictionaryValue();
+ event_params->SetString("filters", filter->OrderedFilterList());
+ return event_params;
+}
+
+} // namespace
+
namespace net {
URLRequestJob::URLRequestJob(URLRequest* request,
@@ -424,6 +437,10 @@ void URLRequestJob::NotifyHeadersComplete() {
request_->GetResponseHeaderByName("content-length", &content_length);
if (!content_length.empty())
base::StringToInt64(content_length, &expected_content_size_);
+ } else {
+ request_->net_log().AddEvent(
+ NetLog::TYPE_URL_REQUEST_FILTERS_SET,
+ base::Bind(&FiltersSetCallback, base::Unretained(filter_.get())));
}
// TODO(vadimt): Remove ScopedTracker below once crbug.com/423948 is fixed.
« no previous file with comments | « net/url_request/url_fetcher_core.cc ('k') | net/websockets/websocket_stream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698