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

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

Issue 2359803003: Job Controller: clean up metrics logging about the job racing result (Closed)
Patch Set: sync Created 4 years, 2 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 #ifndef NET_HTTP_HTTP_STREAM_FACTORY_IMPL_JOB_CONTROLLER_H_ 5 #ifndef NET_HTTP_HTTP_STREAM_FACTORY_IMPL_JOB_CONTROLLER_H_
6 #define NET_HTTP_HTTP_STREAM_FACTORY_IMPL_JOB_CONTROLLER_H_ 6 #define NET_HTTP_HTTP_STREAM_FACTORY_IMPL_JOB_CONTROLLER_H_
7 7
8 #include "net/base/host_port_pair.h" 8 #include "net/base/host_port_pair.h"
9 #include "net/http/http_stream_factory_impl_job.h" 9 #include "net/http/http_stream_factory_impl_job.h"
10 #include "net/http/http_stream_factory_impl_request.h" 10 #include "net/http/http_stream_factory_impl_request.h"
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after
234 // Returns true if the |request_| can be fetched via an alternative 234 // Returns true if the |request_| can be fetched via an alternative
235 // proxy server, and sets |alternative_proxy_server| to the available 235 // proxy server, and sets |alternative_proxy_server| to the available
236 // alternative proxy server. |alternative_proxy_server| should not be null, 236 // alternative proxy server. |alternative_proxy_server| should not be null,
237 // and is owned by the caller. 237 // and is owned by the caller.
238 bool ShouldCreateAlternativeProxyServerJob( 238 bool ShouldCreateAlternativeProxyServerJob(
239 Job* job, 239 Job* job,
240 const ProxyInfo& proxy_info_, 240 const ProxyInfo& proxy_info_,
241 const GURL& url, 241 const GURL& url,
242 ProxyServer* alternative_proxy_server) const; 242 ProxyServer* alternative_proxy_server) const;
243 243
244 // Records histogram metrics for the usage of alternative proxy server. Must 244 // Records histogram metrics for the usage of alternative protocol. Must be
245 // be called when |job| has succeeded, and some other jobs will be orphaned. 245 // called when |job| has succeeded and the other job will be orphaned.
246 void MaybeRecordAlternativeProxyServerUsage(Job* job) const; 246 void ReportAlternateProtocolUsage(Job* job) const;
247 247
248 // Starts the |alternative_job_|. 248 // Starts the |alternative_job_|.
249 void StartAlternativeProxyServerJob(); 249 void StartAlternativeProxyServerJob();
250 250
251 HttpStreamFactoryImpl* factory_; 251 HttpStreamFactoryImpl* factory_;
252 HttpNetworkSession* session_; 252 HttpNetworkSession* session_;
253 JobFactory* job_factory_; 253 JobFactory* job_factory_;
254 254
255 // Request will be handed out to factory once created. This just keeps an 255 // Request will be handed out to factory once created. This just keeps an
256 // reference and is safe as |request_| will notify |this| JobController 256 // reference and is safe as |request_| will notify |this| JobController
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
293 293
294 // True if an alternative proxy server job can be started to fetch |request_|. 294 // True if an alternative proxy server job can be started to fetch |request_|.
295 bool can_start_alternative_proxy_job_; 295 bool can_start_alternative_proxy_job_;
296 296
297 base::WeakPtrFactory<JobController> ptr_factory_; 297 base::WeakPtrFactory<JobController> ptr_factory_;
298 }; 298 };
299 299
300 } // namespace net 300 } // namespace net
301 301
302 #endif // NET_HTTP_HTTP_STREAM_FACTORY_IMPL_JOB_CONTROLLER_H_ 302 #endif // NET_HTTP_HTTP_STREAM_FACTORY_IMPL_JOB_CONTROLLER_H_
OLDNEW
« no previous file with comments | « net/http/http_stream_factory_impl_job.cc ('k') | net/http/http_stream_factory_impl_job_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698