OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_basic_stream.h" | 5 #include "net/http/http_basic_stream.h" |
6 | 6 |
7 #include "base/memory/scoped_ptr.h" | 7 #include "base/memory/scoped_ptr.h" |
8 #include "net/http/http_request_info.h" | 8 #include "net/http/http_request_info.h" |
9 #include "net/http/http_response_body_drainer.h" | 9 #include "net/http/http_response_body_drainer.h" |
10 #include "net/http/http_stream_parser.h" | 10 #include "net/http/http_stream_parser.h" |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 bool HttpBasicStream::IsConnectionReused() const { | 70 bool HttpBasicStream::IsConnectionReused() const { |
71 return parser()->IsConnectionReused(); | 71 return parser()->IsConnectionReused(); |
72 } | 72 } |
73 | 73 |
74 void HttpBasicStream::SetConnectionReused() { parser()->SetConnectionReused(); } | 74 void HttpBasicStream::SetConnectionReused() { parser()->SetConnectionReused(); } |
75 | 75 |
76 bool HttpBasicStream::CanReuseConnection() const { | 76 bool HttpBasicStream::CanReuseConnection() const { |
77 return parser()->CanReuseConnection(); | 77 return parser()->CanReuseConnection(); |
78 } | 78 } |
79 | 79 |
80 int64 HttpBasicStream::GetTotalReceivedBytes() const { | 80 int64_t HttpBasicStream::GetTotalReceivedBytes() const { |
81 if (parser()) | 81 if (parser()) |
82 return parser()->received_bytes(); | 82 return parser()->received_bytes(); |
83 return 0; | 83 return 0; |
84 } | 84 } |
85 | 85 |
86 int64_t HttpBasicStream::GetTotalSentBytes() const { | 86 int64_t HttpBasicStream::GetTotalSentBytes() const { |
87 if (parser()) | 87 if (parser()) |
88 return parser()->sent_bytes(); | 88 return parser()->sent_bytes(); |
89 return 0; | 89 return 0; |
90 } | 90 } |
(...skipping 17 matching lines...) Expand all Loading... |
108 HttpResponseBodyDrainer* drainer = new HttpResponseBodyDrainer(this); | 108 HttpResponseBodyDrainer* drainer = new HttpResponseBodyDrainer(this); |
109 drainer->Start(session); | 109 drainer->Start(session); |
110 // |drainer| will delete itself. | 110 // |drainer| will delete itself. |
111 } | 111 } |
112 | 112 |
113 void HttpBasicStream::SetPriority(RequestPriority priority) { | 113 void HttpBasicStream::SetPriority(RequestPriority priority) { |
114 // TODO(akalin): Plumb this through to |connection_|. | 114 // TODO(akalin): Plumb this through to |connection_|. |
115 } | 115 } |
116 | 116 |
117 } // namespace net | 117 } // namespace net |
OLD | NEW |