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

Unified Diff: net/spdy/spdy_network_transaction.cc

Issue 848006: Generalize the net module's LoadLog facility from a passive container, to an event stream (NetLog). (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Split up RequestTracker into ConnectJobTracker+RequestTracker+RequestTrackerBase, address comments Created 10 years, 9 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/spdy/spdy_network_transaction.h ('k') | net/spdy/spdy_network_transaction_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/spdy/spdy_network_transaction.cc
===================================================================
--- net/spdy/spdy_network_transaction.cc (revision 41560)
+++ net/spdy/spdy_network_transaction.cc (working copy)
@@ -45,13 +45,13 @@
int SpdyNetworkTransaction::Start(const HttpRequestInfo* request_info,
CompletionCallback* callback,
- LoadLog* load_log) {
+ const BoundNetLog& net_log) {
CHECK(request_info);
CHECK(callback);
SIMPLE_STATS_COUNTER("SpdyNetworkTransaction.Count");
- load_log_ = load_log;
+ net_log_ = net_log;
request_ = request_info;
start_time_ = base::TimeTicks::Now();
@@ -159,46 +159,38 @@
switch (state) {
case STATE_INIT_CONNECTION:
DCHECK_EQ(OK, rv);
- LoadLog::BeginEvent(load_log_,
- LoadLog::TYPE_SPDY_TRANSACTION_INIT_CONNECTION);
+ net_log_.BeginEvent(NetLog::TYPE_SPDY_TRANSACTION_INIT_CONNECTION);
rv = DoInitConnection();
break;
case STATE_INIT_CONNECTION_COMPLETE:
- LoadLog::EndEvent(load_log_,
- LoadLog::TYPE_SPDY_TRANSACTION_INIT_CONNECTION);
+ net_log_.EndEvent(NetLog::TYPE_SPDY_TRANSACTION_INIT_CONNECTION);
rv = DoInitConnectionComplete(rv);
break;
case STATE_SEND_REQUEST:
DCHECK_EQ(OK, rv);
- LoadLog::BeginEvent(load_log_,
- LoadLog::TYPE_SPDY_TRANSACTION_SEND_REQUEST);
+ net_log_.BeginEvent(NetLog::TYPE_SPDY_TRANSACTION_SEND_REQUEST);
rv = DoSendRequest();
break;
case STATE_SEND_REQUEST_COMPLETE:
- LoadLog::EndEvent(load_log_,
- LoadLog::TYPE_SPDY_TRANSACTION_SEND_REQUEST);
+ net_log_.EndEvent(NetLog::TYPE_SPDY_TRANSACTION_SEND_REQUEST);
rv = DoSendRequestComplete(rv);
break;
case STATE_READ_HEADERS:
DCHECK_EQ(OK, rv);
- LoadLog::BeginEvent(load_log_,
- LoadLog::TYPE_SPDY_TRANSACTION_READ_HEADERS);
+ net_log_.BeginEvent(NetLog::TYPE_SPDY_TRANSACTION_READ_HEADERS);
rv = DoReadHeaders();
break;
case STATE_READ_HEADERS_COMPLETE:
- LoadLog::EndEvent(load_log_,
- LoadLog::TYPE_SPDY_TRANSACTION_READ_HEADERS);
+ net_log_.EndEvent(NetLog::TYPE_SPDY_TRANSACTION_READ_HEADERS);
rv = DoReadHeadersComplete(rv);
break;
case STATE_READ_BODY:
DCHECK_EQ(OK, rv);
- LoadLog::BeginEvent(load_log_,
- LoadLog::TYPE_SPDY_TRANSACTION_READ_BODY);
+ net_log_.BeginEvent(NetLog::TYPE_SPDY_TRANSACTION_READ_BODY);
rv = DoReadBody();
break;
case STATE_READ_BODY_COMPLETE:
- LoadLog::EndEvent(load_log_,
- LoadLog::TYPE_SPDY_TRANSACTION_READ_BODY);
+ net_log_.EndEvent(NetLog::TYPE_SPDY_TRANSACTION_READ_BODY);
rv = DoReadBodyComplete(rv);
break;
case STATE_NONE:
@@ -240,7 +232,7 @@
DCHECK(spdy_);
return spdy_->Connect(
- connection_group, tcp_params, request_->priority, load_log_);
+ connection_group, tcp_params, request_->priority, net_log_);
}
int SpdyNetworkTransaction::DoInitConnectionComplete(int result) {
@@ -256,7 +248,7 @@
CHECK(!stream_.get());
UploadDataStream* upload_data = request_->upload_data ?
new UploadDataStream(request_->upload_data) : NULL;
- stream_ = spdy_->GetOrCreateStream(*request_, upload_data, load_log_.get());
+ stream_ = spdy_->GetOrCreateStream(*request_, upload_data, net_log_);
// Release the reference to |spdy_| since we don't need it anymore.
spdy_ = NULL;
return stream_->SendRequest(upload_data, &response_, &io_callback_);
« no previous file with comments | « net/spdy/spdy_network_transaction.h ('k') | net/spdy/spdy_network_transaction_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698