Upstream version 10.39.225.0
[platform/framework/web/crosswalk.git] / src / net / http / proxy_connect_redirect_http_stream.cc
1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "net/http/proxy_connect_redirect_http_stream.h"
6
7 #include <cstddef>
8
9 #include "base/logging.h"
10 #include "net/base/net_errors.h"
11
12 namespace net {
13
14 ProxyConnectRedirectHttpStream::ProxyConnectRedirectHttpStream(
15     LoadTimingInfo* load_timing_info)
16     : has_load_timing_info_(load_timing_info != NULL) {
17   if (has_load_timing_info_)
18     load_timing_info_ = *load_timing_info;
19 }
20
21 ProxyConnectRedirectHttpStream::~ProxyConnectRedirectHttpStream() {}
22
23 int ProxyConnectRedirectHttpStream::InitializeStream(
24     const HttpRequestInfo* request_info,
25     RequestPriority priority,
26     const BoundNetLog& net_log,
27     const CompletionCallback& callback) {
28   NOTREACHED();
29   return OK;
30 }
31
32 int ProxyConnectRedirectHttpStream::SendRequest(
33     const HttpRequestHeaders& request_headers,
34     HttpResponseInfo* response,
35     const CompletionCallback& callback) {
36   NOTREACHED();
37   return OK;
38 }
39
40 int ProxyConnectRedirectHttpStream::ReadResponseHeaders(
41     const CompletionCallback& callback) {
42   NOTREACHED();
43   return OK;
44 }
45
46 int ProxyConnectRedirectHttpStream::ReadResponseBody(
47     IOBuffer* buf,
48     int buf_len,
49     const CompletionCallback& callback) {
50   NOTREACHED();
51   return OK;
52 }
53
54 void ProxyConnectRedirectHttpStream::Close(bool not_reusable) {}
55
56 bool ProxyConnectRedirectHttpStream::IsResponseBodyComplete() const {
57   NOTREACHED();
58   return true;
59 }
60
61 bool ProxyConnectRedirectHttpStream::CanFindEndOfResponse() const {
62   return true;
63 }
64
65 bool ProxyConnectRedirectHttpStream::IsConnectionReused() const {
66   NOTREACHED();
67   return false;
68 }
69
70 void ProxyConnectRedirectHttpStream::SetConnectionReused() {
71   NOTREACHED();
72 }
73
74 bool ProxyConnectRedirectHttpStream::IsConnectionReusable() const {
75   NOTREACHED();
76   return false;
77 }
78
79 int64 ProxyConnectRedirectHttpStream::GetTotalReceivedBytes() const {
80   return 0;
81 }
82
83 bool ProxyConnectRedirectHttpStream::GetLoadTimingInfo(
84     LoadTimingInfo* load_timing_info) const {
85   if (!has_load_timing_info_)
86     return false;
87
88   *load_timing_info = load_timing_info_;
89   return true;
90 }
91
92 void ProxyConnectRedirectHttpStream::GetSSLInfo(SSLInfo* ssl_info) {
93   NOTREACHED();
94 }
95
96 void ProxyConnectRedirectHttpStream::GetSSLCertRequestInfo(
97     SSLCertRequestInfo* cert_request_info) {
98   NOTREACHED();
99 }
100
101 bool ProxyConnectRedirectHttpStream::IsSpdyHttpStream() const {
102   NOTREACHED();
103   return false;
104 }
105
106 void ProxyConnectRedirectHttpStream::Drain(HttpNetworkSession* session) {
107   NOTREACHED();
108 }
109
110 void ProxyConnectRedirectHttpStream::SetPriority(RequestPriority priority) {
111   // Nothing to do.
112 }
113
114 UploadProgress ProxyConnectRedirectHttpStream::GetUploadProgress() const {
115   return UploadProgress();
116 }
117
118 HttpStream* ProxyConnectRedirectHttpStream::RenewStreamForAuth() {
119   NOTREACHED();
120   return NULL;
121 }
122
123 }  // namespace