OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/server/web_socket_encoder.h" | 5 #include "net/server/web_socket_encoder.h" |
6 | 6 |
7 #include <limits> | |
8 #include <utility> | 7 #include <utility> |
9 #include <vector> | 8 #include <vector> |
10 | 9 |
11 #include "base/logging.h" | 10 #include "base/logging.h" |
12 #include "base/strings/string_number_conversions.h" | 11 #include "base/strings/string_number_conversions.h" |
13 #include "base/strings/stringprintf.h" | 12 #include "base/strings/stringprintf.h" |
14 #include "net/base/io_buffer.h" | 13 #include "net/base/io_buffer.h" |
15 #include "net/websockets/websocket_deflate_parameters.h" | 14 #include "net/websockets/websocket_deflate_parameters.h" |
16 #include "net/websockets/websocket_extension.h" | 15 #include "net/websockets/websocket_extension.h" |
17 #include "net/websockets/websocket_extension_parser.h" | 16 #include "net/websockets/websocket_extension_parser.h" |
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
345 return false; | 344 return false; |
346 scoped_refptr<IOBufferWithSize> buffer = | 345 scoped_refptr<IOBufferWithSize> buffer = |
347 deflater_->GetOutput(deflater_->CurrentOutputSize()); | 346 deflater_->GetOutput(deflater_->CurrentOutputSize()); |
348 if (!buffer.get()) | 347 if (!buffer.get()) |
349 return false; | 348 return false; |
350 *output = std::string(buffer->data(), buffer->size()); | 349 *output = std::string(buffer->data(), buffer->size()); |
351 return true; | 350 return true; |
352 } | 351 } |
353 | 352 |
354 } // namespace net | 353 } // namespace net |
OLD | NEW |