| 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/websockets/websocket_job.h" | 5 #include "net/websockets/websocket_job.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/lazy_instance.h" | 10 #include "base/lazy_instance.h" |
| 11 #include "googleurl/src/gurl.h" | |
| 12 #include "net/base/io_buffer.h" | 11 #include "net/base/io_buffer.h" |
| 13 #include "net/base/net_errors.h" | 12 #include "net/base/net_errors.h" |
| 14 #include "net/base/net_log.h" | 13 #include "net/base/net_log.h" |
| 15 #include "net/cookies/cookie_store.h" | 14 #include "net/cookies/cookie_store.h" |
| 16 #include "net/http/http_network_session.h" | 15 #include "net/http/http_network_session.h" |
| 17 #include "net/http/http_transaction_factory.h" | 16 #include "net/http/http_transaction_factory.h" |
| 18 #include "net/http/http_util.h" | 17 #include "net/http/http_util.h" |
| 19 #include "net/spdy/spdy_session.h" | 18 #include "net/spdy/spdy_session.h" |
| 20 #include "net/spdy/spdy_session_pool.h" | 19 #include "net/spdy/spdy_session_pool.h" |
| 21 #include "net/url_request/url_request_context.h" | 20 #include "net/url_request/url_request_context.h" |
| 22 #include "net/websockets/websocket_handshake_handler.h" | 21 #include "net/websockets/websocket_handshake_handler.h" |
| 23 #include "net/websockets/websocket_net_log_params.h" | 22 #include "net/websockets/websocket_net_log_params.h" |
| 24 #include "net/websockets/websocket_throttle.h" | 23 #include "net/websockets/websocket_throttle.h" |
| 24 #include "url/gurl.h" |
| 25 | 25 |
| 26 static const int kMaxPendingSendAllowed = 32768; // 32 kilobytes. | 26 static const int kMaxPendingSendAllowed = 32768; // 32 kilobytes. |
| 27 | 27 |
| 28 namespace { | 28 namespace { |
| 29 | 29 |
| 30 // lower-case header names. | 30 // lower-case header names. |
| 31 const char* const kCookieHeaders[] = { | 31 const char* const kCookieHeaders[] = { |
| 32 "cookie", "cookie2" | 32 "cookie", "cookie2" |
| 33 }; | 33 }; |
| 34 const char* const kSetCookieHeaders[] = { | 34 const char* const kSetCookieHeaders[] = { |
| (...skipping 660 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 695 | 695 |
| 696 scoped_refptr<IOBufferWithSize> next_buffer = send_buffer_queue_.front(); | 696 scoped_refptr<IOBufferWithSize> next_buffer = send_buffer_queue_.front(); |
| 697 send_buffer_queue_.pop_front(); | 697 send_buffer_queue_.pop_front(); |
| 698 current_send_buffer_ = | 698 current_send_buffer_ = |
| 699 new DrainableIOBuffer(next_buffer.get(), next_buffer->size()); | 699 new DrainableIOBuffer(next_buffer.get(), next_buffer->size()); |
| 700 SendDataInternal(current_send_buffer_->data(), | 700 SendDataInternal(current_send_buffer_->data(), |
| 701 current_send_buffer_->BytesRemaining()); | 701 current_send_buffer_->BytesRemaining()); |
| 702 } | 702 } |
| 703 | 703 |
| 704 } // namespace net | 704 } // namespace net |
| OLD | NEW |