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

Unified Diff: net/http/http_stream_parser.cc

Issue 2315613002: Extracted NetLog class's inner enum types into their own enum classes and (Closed)
Patch Set: Created 4 years, 3 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
Index: net/http/http_stream_parser.cc
diff --git a/net/http/http_stream_parser.cc b/net/http/http_stream_parser.cc
index 87e34da7bd470eefcff36af46b9ca22bc562299e..7478f278489bc8207455a4a5bb2a93ddca5b3593 100644
--- a/net/http/http_stream_parser.cc
+++ b/net/http/http_stream_parser.cc
@@ -22,6 +22,7 @@
#include "net/http/http_response_headers.h"
#include "net/http/http_status_line_validator.h"
#include "net/http/http_util.h"
+#include "net/log/net_log_event_type.h"
#include "net/socket/client_socket_handle.h"
#include "net/socket/ssl_client_socket.h"
#include "net/ssl/token_binding.h"
@@ -242,7 +243,7 @@ int HttpStreamParser::SendRequest(const std::string& request_line,
DCHECK(response);
net_log_.AddEvent(
- NetLog::TYPE_HTTP_TRANSACTION_SEND_REQUEST_HEADERS,
+ NetLogEventType::HTTP_TRANSACTION_SEND_REQUEST_HEADERS,
base::Bind(&HttpRequestHeaders::NetLogCallback,
base::Unretained(&headers),
&request_line));
@@ -307,7 +308,7 @@ int HttpStreamParser::SendRequest(const std::string& request_line,
did_merge = true;
net_log_.AddEvent(
- NetLog::TYPE_HTTP_TRANSACTION_SEND_REQUEST_BODY,
+ NetLogEventType::HTTP_TRANSACTION_SEND_REQUEST_BODY,
base::Bind(&NetLogSendRequestBodyCallback,
request_->upload_data_stream->size(),
false, /* not chunked */
@@ -435,14 +436,14 @@ int HttpStreamParser::DoLoop(int result) {
result = DoSendRequestComplete(result);
break;
case STATE_READ_HEADERS:
- net_log_.BeginEvent(NetLog::TYPE_HTTP_STREAM_PARSER_READ_HEADERS);
+ net_log_.BeginEvent(NetLogEventType::HTTP_STREAM_PARSER_READ_HEADERS);
DCHECK_GE(result, 0);
result = DoReadHeaders();
break;
case STATE_READ_HEADERS_COMPLETE:
result = DoReadHeadersComplete(result);
net_log_.EndEventWithNetErrorCode(
- NetLog::TYPE_HTTP_STREAM_PARSER_READ_HEADERS, result);
+ NetLogEventType::HTTP_STREAM_PARSER_READ_HEADERS, result);
break;
case STATE_READ_BODY:
DCHECK_GE(result, 0);
@@ -508,7 +509,7 @@ int HttpStreamParser::DoSendHeadersComplete(int result) {
(request_->upload_data_stream->size() > 0 &&
!request_->upload_data_stream->IsEOF()))) {
net_log_.AddEvent(
- NetLog::TYPE_HTTP_TRANSACTION_SEND_REQUEST_BODY,
+ NetLogEventType::HTTP_TRANSACTION_SEND_REQUEST_BODY,
base::Bind(&NetLogSendRequestBodyCallback,
request_->upload_data_stream->size(),
request_->upload_data_stream->is_chunked(),

Powered by Google App Engine
This is Rietveld 408576698