summaryrefslogtreecommitdiff
path: root/chromium/net/http/http_stream_factory_job_controller.cc
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2022-02-02 12:21:57 +0100
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2022-02-12 08:13:00 +0000
commit606d85f2a5386472314d39923da28c70c60dc8e7 (patch)
treea8f4d7bf997f349f45605e6058259fba0630e4d7 /chromium/net/http/http_stream_factory_job_controller.cc
parent5786336dda477d04fb98483dca1a5426eebde2d7 (diff)
downloadqtwebengine-chromium-606d85f2a5386472314d39923da28c70c60dc8e7.tar.gz
BASELINE: Update Chromium to 96.0.4664.181
Change-Id: I762cd1da89d73aa6313b4a753fe126c34833f046 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'chromium/net/http/http_stream_factory_job_controller.cc')
-rw-r--r--chromium/net/http/http_stream_factory_job_controller.cc29
1 files changed, 16 insertions, 13 deletions
diff --git a/chromium/net/http/http_stream_factory_job_controller.cc b/chromium/net/http/http_stream_factory_job_controller.cc
index 7693e320cf2..38a8b9ebe05 100644
--- a/chromium/net/http/http_stream_factory_job_controller.cc
+++ b/chromium/net/http/http_stream_factory_job_controller.cc
@@ -18,6 +18,9 @@
#include "base/values.h"
#include "net/base/host_mapping_rules.h"
#include "net/base/load_flags.h"
+#include "net/base/privacy_mode.h"
+#include "net/base/proxy_server.h"
+#include "net/base/proxy_string_util.h"
#include "net/base/url_util.h"
#include "net/http/bidirectional_stream_impl.h"
#include "net/http/transport_security_state.h"
@@ -43,9 +46,10 @@ base::Value NetLogHttpStreamJobProxyServerResolved(
const ProxyServer& proxy_server) {
base::Value dict(base::Value::Type::DICTIONARY);
- dict.SetStringKey("proxy_server", proxy_server.is_valid()
- ? proxy_server.ToPacString()
- : std::string());
+ dict.SetStringKey("proxy_server",
+ proxy_server.is_valid()
+ ? ProxyServerToPacResultElement(proxy_server)
+ : std::string());
return dict;
}
@@ -85,10 +89,14 @@ void ConvertWsToHttp(url::SchemeHostPort& input) {
// the main job.
const int kMaxDelayTimeForMainJobSecs = 3;
-base::Value NetLogJobControllerParams(const GURL& url, bool is_preconnect) {
+base::Value NetLogJobControllerParams(const HttpRequestInfo& request_info,
+ bool is_preconnect) {
base::Value dict(base::Value::Type::DICTIONARY);
- dict.SetStringKey("url", url.possibly_invalid_spec());
+ dict.SetStringKey("url", request_info.url.possibly_invalid_spec());
dict.SetBoolKey("is_preconnect", is_preconnect);
+ dict.SetStringKey("privacy_mode",
+ PrivacyModeToDebugString(request_info.privacy_mode));
+
return dict;
}
@@ -149,7 +157,7 @@ HttpStreamFactory::JobController::JobController(
url::kWssScheme));
net_log_.BeginEvent(NetLogEventType::HTTP_STREAM_JOB_CONTROLLER, [&] {
- return NetLogJobControllerParams(request_info.url, is_preconnect);
+ return NetLogJobControllerParams(request_info, is_preconnect);
});
}
@@ -575,8 +583,8 @@ const NetLogWithSource* HttpStreamFactory::JobController::GetNetLog() const {
void HttpStreamFactory::JobController::MaybeSetWaitTimeForMainJob(
const base::TimeDelta& delay) {
if (main_job_is_blocked_) {
- main_job_wait_time_ = std::min(
- delay, base::TimeDelta::FromSeconds(kMaxDelayTimeForMainJobSecs));
+ main_job_wait_time_ =
+ std::min(delay, base::Seconds(kMaxDelayTimeForMainJobSecs));
}
}
@@ -588,11 +596,6 @@ bool HttpStreamFactory::JobController::HasPendingAltJob() const {
return alternative_job_.get() != nullptr;
}
-size_t HttpStreamFactory::JobController::EstimateMemoryUsage() const {
- return base::trace_event::EstimateMemoryUsage(main_job_) +
- base::trace_event::EstimateMemoryUsage(alternative_job_);
-}
-
WebSocketHandshakeStreamBase::CreateHelper*
HttpStreamFactory::JobController::websocket_handshake_stream_create_helper() {
DCHECK(request_);