Make some raw_ptrs in HttpStreamFactory::JobController const
These fields are never updated. Annotate them const to make it explicit. Bug: N/A Change-Id: I22d6e029e305b8af8184c9ddd8b35d3fb8bd9e59 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5678101 Commit-Queue: Kenichi Ishibashi <bashi@chromium.org> Reviewed-by: Tsuyoshi Horo <horo@chromium.org> Cr-Commit-Position: refs/heads/main@{#1323214}
This commit is contained in:

committed by
Chromium LUCI CQ

parent
7ab6f54a4d
commit
3c327a5960
@ -151,7 +151,9 @@ HttpStreamFactory::JobController::JobController(
|
||||
net_log_(NetLogWithSource::Make(
|
||||
session->net_log(),
|
||||
NetLogSourceType::HTTP_STREAM_JOB_CONTROLLER)) {
|
||||
DCHECK(factory);
|
||||
DCHECK(factory_);
|
||||
DCHECK(session_);
|
||||
DCHECK(job_factory_);
|
||||
DCHECK(base::EqualsCaseInsensitiveASCII(origin_url_.scheme_piece(),
|
||||
url::kHttpScheme) ||
|
||||
base::EqualsCaseInsensitiveASCII(origin_url_.scheme_piece(),
|
||||
@ -193,7 +195,6 @@ std::unique_ptr<HttpStreamRequest> HttpStreamFactory::JobController::Start(
|
||||
const NetLogWithSource& source_net_log,
|
||||
HttpStreamRequest::StreamType stream_type,
|
||||
RequestPriority priority) {
|
||||
DCHECK(factory_);
|
||||
DCHECK(!request_);
|
||||
|
||||
stream_type_ = stream_type;
|
||||
@ -771,7 +772,6 @@ int HttpStreamFactory::JobController::DoLoop(int rv) {
|
||||
|
||||
int HttpStreamFactory::JobController::DoResolveProxy() {
|
||||
DCHECK(!proxy_resolve_request_);
|
||||
DCHECK(session_);
|
||||
|
||||
next_state_ = STATE_RESOLVE_PROXY_COMPLETE;
|
||||
|
||||
@ -1416,7 +1416,6 @@ int HttpStreamFactory::JobController::ReconsiderProxyAfterError(Job* job,
|
||||
// ReconsiderProxyAfterError() should only be called when the last job fails.
|
||||
DCHECK_EQ(1, GetJobCount());
|
||||
DCHECK(!proxy_resolve_request_);
|
||||
DCHECK(session_);
|
||||
|
||||
if (!job->should_reconsider_proxy()) {
|
||||
return error;
|
||||
|
@ -293,9 +293,9 @@ class HttpStreamFactory::JobController
|
||||
(dns_alpn_h3_job_ ? 1 : 0);
|
||||
}
|
||||
|
||||
raw_ptr<HttpStreamFactory> factory_;
|
||||
raw_ptr<HttpNetworkSession> session_;
|
||||
raw_ptr<JobFactory> job_factory_;
|
||||
const raw_ptr<HttpStreamFactory> factory_;
|
||||
const raw_ptr<HttpNetworkSession> session_;
|
||||
const raw_ptr<JobFactory> job_factory_;
|
||||
|
||||
// Request will be handed out to factory once created. This just keeps an
|
||||
// reference and is safe as |request_| will notify |this| JobController
|
||||
|
Reference in New Issue
Block a user