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

Unified Diff: net/url_request/url_request_http_job.cc

Issue 2956023003: Add enable_reporting to fix size regression in Cronet. (Closed)
Patch Set: Move build_config header back to top, to fix windows Created 3 years, 6 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
« no previous file with comments | « net/url_request/url_request_context_storage.cc ('k') | net/url_request/url_request_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/url_request/url_request_http_job.cc
diff --git a/net/url_request/url_request_http_job.cc b/net/url_request/url_request_http_job.cc
index b34fbd5157d27740a789fa471bf4b9ef748fee18..0ed10584be5dcf7b86e538926c637712fa5d7b7f 100644
--- a/net/url_request/url_request_http_job.cc
+++ b/net/url_request/url_request_http_job.cc
@@ -24,6 +24,7 @@
#include "base/time/time.h"
#include "base/trace_event/trace_event.h"
#include "base/values.h"
+#include "build/buildflag.h"
#include "net/base/host_port_pair.h"
#include "net/base/load_flags.h"
#include "net/base/net_errors.h"
@@ -51,11 +52,11 @@
#include "net/http/http_util.h"
#include "net/log/net_log_event_type.h"
#include "net/log/net_log_with_source.h"
+#include "net/net_features.h"
#include "net/nqe/network_quality_estimator.h"
#include "net/proxy/proxy_info.h"
#include "net/proxy/proxy_retry_info.h"
#include "net/proxy/proxy_service.h"
-#include "net/reporting/reporting_service.h"
#include "net/ssl/channel_id_service.h"
#include "net/ssl/ssl_cert_request_info.h"
#include "net/ssl/ssl_config_service.h"
@@ -73,6 +74,10 @@
#include "net/android/network_library.h"
#endif
+#if BUILDFLAG(ENABLE_REPORTING)
+#include "net/reporting/reporting_service.h"
+#endif // BUILDFLAG(ENABLE_REPORTING)
+
static const char kAvailDictionaryHeader[] = "Avail-Dictionary";
namespace {
@@ -852,6 +857,7 @@ void URLRequestHttpJob::ProcessExpectCTHeader() {
void URLRequestHttpJob::ProcessReportToHeader() {
DCHECK(response_info_);
+#if BUILDFLAG(ENABLE_REPORTING)
ReportingService* service = request_->context()->reporting_service();
if (!service)
return;
@@ -869,6 +875,7 @@ void URLRequestHttpJob::ProcessReportToHeader() {
return;
service->ProcessHeader(request_info_.url.GetOrigin(), value);
+#endif // BUILDFLAG(ENABLE_REPORTING)
}
void URLRequestHttpJob::OnStartCompleted(int result) {
« no previous file with comments | « net/url_request/url_request_context_storage.cc ('k') | net/url_request/url_request_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698