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

Unified Diff: net/quic/chromium/quic_stream_factory.cc

Issue 2800023002: Create a separate NetLog source type QUIC_STREAM_FACTORY_JOB (Closed)
Patch Set: Created 3 years, 8 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/log/net_log_source_type_list.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/chromium/quic_stream_factory.cc
diff --git a/net/quic/chromium/quic_stream_factory.cc b/net/quic/chromium/quic_stream_factory.cc
index 0f855f0aad2fc91b2dbd342ed323617889c9626e..1b7dd55a11516aac575fff5ace146547933d2f1d 100644
--- a/net/quic/chromium/quic_stream_factory.cc
+++ b/net/quic/chromium/quic_stream_factory.cc
@@ -386,12 +386,25 @@ QuicStreamFactory::Job::Job(QuicStreamFactory* factory,
was_alternative_service_recently_broken),
server_info_(std::move(server_info)),
started_another_job_(false),
- net_log_(net_log),
+ net_log_(
+ NetLogWithSource::Make(net_log.net_log(),
+ NetLogSourceType::QUIC_STREAM_FACTORY_JOB)),
num_sent_client_hellos_(0),
session_(nullptr),
- weak_factory_(this) {}
+ weak_factory_(this) {
+ std::string server_id = key_.server_id().ToString();
+ net_log_.BeginEvent(NetLogEventType::QUIC_STREAM_FACTORY_JOB,
+ NetLog::StringCallback("server_id", &server_id));
+ net_log.AddEvent(
+ NetLogEventType::HTTP_STREAM_JOB_BOUND_TO_QUIC_STREAM_FACTORY_JOB,
+ net_log_.source().ToEventParametersCallback());
+ net_log_.AddEvent(
+ NetLogEventType::QUIC_STREAM_FACTORY_JOB_BOUND_TO_HTTP_STREAM_JOB,
+ net_log.source().ToEventParametersCallback());
Ryan Hamilton 2017/04/06 23:55:11 Can you add comments to these. Also can you put th
Zhongyi Shi 2017/04/07 00:17:42 Done. That's a good idea, sorry about the inconven
Ryan Hamilton 2017/04/07 00:20:32 Thanks for doing this work!
+}
QuicStreamFactory::Job::~Job() {
+ net_log_.EndEvent(NetLogEventType::QUIC_STREAM_FACTORY_JOB);
DCHECK(callback_.is_null());
// If disk cache has a pending WaitForDataReadyCallback, cancel that callback.
« no previous file with comments | « net/log/net_log_source_type_list.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698