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

Side by Side Diff: net/http/http_stream_factory_impl_job_controller.cc

Issue 2093873002: Unwind fallback metrics and SSLFailureState. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2016 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "net/http/http_stream_factory_impl_job_controller.h" 5 #include "net/http/http_stream_factory_impl_job_controller.h"
6 6
7 #include "base/metrics/histogram_macros.h" 7 #include "base/metrics/histogram_macros.h"
8 #include "base/strings/string_number_conversions.h" 8 #include "base/strings/string_number_conversions.h"
9 #include "base/strings/string_util.h" 9 #include "base/strings/string_util.h"
10 #include "net/base/host_mapping_rules.h" 10 #include "net/base/host_mapping_rules.h"
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 DCHECK(stream); 214 DCHECK(stream);
215 215
216 OnJobSucceeded(job); 216 OnJobSucceeded(job);
217 request_->OnWebSocketHandshakeStreamReady(used_ssl_config, used_proxy_info, 217 request_->OnWebSocketHandshakeStreamReady(used_ssl_config, used_proxy_info,
218 stream); 218 stream);
219 } 219 }
220 220
221 void HttpStreamFactoryImpl::JobController::OnStreamFailed( 221 void HttpStreamFactoryImpl::JobController::OnStreamFailed(
222 Job* job, 222 Job* job,
223 int status, 223 int status,
224 const SSLConfig& used_ssl_config, 224 const SSLConfig& used_ssl_config) {
225 SSLFailureState ssl_failure_state) {
226 if (job_bound_ && bound_job_ != job) { 225 if (job_bound_ && bound_job_ != job) {
227 // We have bound a job to the associated Request, |job| has been orphaned. 226 // We have bound a job to the associated Request, |job| has been orphaned.
228 OnOrphanedJobComplete(job); 227 OnOrphanedJobComplete(job);
229 return; 228 return;
230 } 229 }
231 230
232 if (!request_) 231 if (!request_)
233 return; 232 return;
234 DCHECK_NE(OK, status); 233 DCHECK_NE(OK, status);
235 DCHECK(job); 234 DCHECK(job);
(...skipping 11 matching lines...) Expand all
247 DCHECK(job->job_type() == ALTERNATIVE); 246 DCHECK(job->job_type() == ALTERNATIVE);
248 main_job_->MarkOtherJobComplete(*job); 247 main_job_->MarkOtherJobComplete(*job);
249 alternative_job_.reset(); 248 alternative_job_.reset();
250 } 249 }
251 return; 250 return;
252 } else { 251 } else {
253 BindJob(job); 252 BindJob(job);
254 } 253 }
255 } 254 }
256 255
257 request_->OnStreamFailed(status, used_ssl_config, ssl_failure_state); 256 request_->OnStreamFailed(status, used_ssl_config);
258 } 257 }
259 258
260 void HttpStreamFactoryImpl::JobController::OnCertificateError( 259 void HttpStreamFactoryImpl::JobController::OnCertificateError(
261 Job* job, 260 Job* job,
262 int status, 261 int status,
263 const SSLConfig& used_ssl_config, 262 const SSLConfig& used_ssl_config,
264 const SSLInfo& ssl_info) { 263 const SSLInfo& ssl_info) {
265 if (job_bound_ && bound_job_ != job) { 264 if (job_bound_ && bound_job_ != job) {
266 // We have bound a job to the associated Request, |job| has been orphaned. 265 // We have bound a job to the associated Request, |job| has been orphaned.
267 OnOrphanedJobComplete(job); 266 OnOrphanedJobComplete(job);
(...skipping 544 matching lines...) Expand 10 before | Expand all | Expand 10 after
812 first_alternative_service = alternative_service; 811 first_alternative_service = alternative_service;
813 } 812 }
814 813
815 // Ask delegate to mark QUIC as broken for the origin. 814 // Ask delegate to mark QUIC as broken for the origin.
816 if (quic_advertised && quic_all_broken && delegate != nullptr) 815 if (quic_advertised && quic_all_broken && delegate != nullptr)
817 delegate->OnQuicBroken(); 816 delegate->OnQuicBroken();
818 817
819 return first_alternative_service; 818 return first_alternative_service;
820 } 819 }
821 } 820 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698