| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 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 | 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/websockets/websocket_stream.h" | 5 #include "net/websockets/websocket_stream.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "base/metrics/histogram.h" | 9 #include "base/metrics/histogram.h" |
| 10 #include "base/metrics/sparse_histogram.h" | 10 #include "base/metrics/sparse_histogram.h" |
| (...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 307 request->Start(); | 307 request->Start(); |
| 308 return request.PassAs<WebSocketStreamRequest>(); | 308 return request.PassAs<WebSocketStreamRequest>(); |
| 309 } | 309 } |
| 310 | 310 |
| 311 void WebSocketDispatchOnFinishOpeningHandshake( | 311 void WebSocketDispatchOnFinishOpeningHandshake( |
| 312 WebSocketStream::ConnectDelegate* connect_delegate, | 312 WebSocketStream::ConnectDelegate* connect_delegate, |
| 313 const GURL& url, | 313 const GURL& url, |
| 314 const scoped_refptr<HttpResponseHeaders>& headers, | 314 const scoped_refptr<HttpResponseHeaders>& headers, |
| 315 base::Time response_time) { | 315 base::Time response_time) { |
| 316 DCHECK(connect_delegate); | 316 DCHECK(connect_delegate); |
| 317 if (headers) { | 317 if (headers.get()) { |
| 318 connect_delegate->OnFinishOpeningHandshake(make_scoped_ptr( | 318 connect_delegate->OnFinishOpeningHandshake(make_scoped_ptr( |
| 319 new WebSocketHandshakeResponseInfo(url, | 319 new WebSocketHandshakeResponseInfo(url, |
| 320 headers->response_code(), | 320 headers->response_code(), |
| 321 headers->GetStatusText(), | 321 headers->GetStatusText(), |
| 322 headers, | 322 headers, |
| 323 response_time))); | 323 response_time))); |
| 324 } | 324 } |
| 325 } | 325 } |
| 326 | 326 |
| 327 } // namespace net | 327 } // namespace net |
| OLD | NEW |