summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrch@chromium.org <rch@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-09-29 15:27:44 +0000
committerrch@chromium.org <rch@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-09-29 15:27:44 +0000
commit6c7e65208cedc0ff790738a67794474c679ee578 (patch)
tree71ac7941a02e76e13705e75e712679286931326a
parent29239893bfafc535339be2adf7845a5010213a51 (diff)
downloadchromium_src-6c7e65208cedc0ff790738a67794474c679ee578.zip
chromium_src-6c7e65208cedc0ff790738a67794474c679ee578.tar.gz
chromium_src-6c7e65208cedc0ff790738a67794474c679ee578.tar.bz2
Break out balsa and epoll_server from net/tools/flip_server.
balsa is an HTTP headers/framing abstraction used by code in net/tools/flip_server and net/tools/quic. epoll_server is a event-driven server abstraction based on (as the name suggested) epoll. It is also used by code in net/tools/flip_server and net/tools/quic. Since these are both shared across different layers, it makes sense to split them into different directories. Review URL: https://codereview.chromium.org/25085002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@225890 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--net/net.gyp79
-rw-r--r--net/tools/DEPS1
-rw-r--r--net/tools/balsa/balsa_enums.h (renamed from net/tools/flip_server/balsa_enums.h)8
-rw-r--r--net/tools/balsa/balsa_frame.cc (renamed from net/tools/flip_server/balsa_frame.cc)18
-rw-r--r--net/tools/balsa/balsa_frame.h (renamed from net/tools/flip_server/balsa_frame.h)20
-rw-r--r--net/tools/balsa/balsa_frame_test.cc (renamed from net/tools/flip_server/balsa_frame_test.cc)6
-rw-r--r--net/tools/balsa/balsa_headers.cc (renamed from net/tools/flip_server/balsa_headers.cc)14
-rw-r--r--net/tools/balsa/balsa_headers.h (renamed from net/tools/flip_server/balsa_headers.h)12
-rw-r--r--net/tools/balsa/balsa_headers_test.cc (renamed from net/tools/flip_server/balsa_headers_test.cc)4
-rw-r--r--net/tools/balsa/balsa_headers_token_utils.cc (renamed from net/tools/flip_server/balsa_headers_token_utils.cc)6
-rw-r--r--net/tools/balsa/balsa_headers_token_utils.h (renamed from net/tools/flip_server/balsa_headers_token_utils.h)10
-rw-r--r--net/tools/balsa/balsa_visitor_interface.h (renamed from net/tools/flip_server/balsa_visitor_interface.h)8
-rw-r--r--net/tools/balsa/buffer_interface.h (renamed from net/tools/flip_server/buffer_interface.h)8
-rw-r--r--net/tools/balsa/http_message_constants.cc146
-rw-r--r--net/tools/balsa/http_message_constants.h (renamed from net/tools/flip_server/http_message_constants.h)8
-rw-r--r--net/tools/balsa/noop_balsa_visitor.h (renamed from net/tools/flip_server/noop_balsa_visitor.h)8
-rw-r--r--net/tools/balsa/simple_buffer.cc (renamed from net/tools/flip_server/simple_buffer.cc)4
-rw-r--r--net/tools/balsa/simple_buffer.h (renamed from net/tools/flip_server/simple_buffer.h)10
-rw-r--r--net/tools/balsa/split.cc (renamed from net/tools/flip_server/split.cc)4
-rw-r--r--net/tools/balsa/split.h (renamed from net/tools/flip_server/split.h)8
-rw-r--r--net/tools/balsa/string_piece_utils.h (renamed from net/tools/flip_server/string_piece_utils.h)8
-rw-r--r--net/tools/epoll_server/epoll_server.cc (renamed from net/tools/flip_server/epoll_server.cc)4
-rw-r--r--net/tools/epoll_server/epoll_server.h (renamed from net/tools/flip_server/epoll_server.h)11
-rw-r--r--net/tools/flip_server/acceptor_thread.h2
-rw-r--r--net/tools/flip_server/flip_in_mem_edsm_server.cc3
-rw-r--r--net/tools/flip_server/http_interface.cc2
-rw-r--r--net/tools/flip_server/http_interface.h4
-rw-r--r--net/tools/flip_server/http_interface_test.cc6
-rw-r--r--net/tools/flip_server/mem_cache.cc4
-rw-r--r--net/tools/flip_server/mem_cache.h4
-rw-r--r--net/tools/flip_server/mem_cache_test.cc2
-rw-r--r--net/tools/flip_server/output_ordering.h2
-rw-r--r--net/tools/flip_server/ring_buffer.h2
-rw-r--r--net/tools/flip_server/sm_connection.h2
-rw-r--r--net/tools/flip_server/sm_interface.h2
-rw-r--r--net/tools/flip_server/spdy_interface.h4
-rw-r--r--net/tools/flip_server/spdy_interface_test.cc4
-rw-r--r--net/tools/flip_server/streamer_interface.cc2
-rw-r--r--net/tools/flip_server/streamer_interface.h4
-rw-r--r--net/tools/quic/quic_client.cc2
-rw-r--r--net/tools/quic/quic_client.h2
-rw-r--r--net/tools/quic/quic_dispatcher.h2
-rw-r--r--net/tools/quic/quic_dispatcher_test.cc2
-rw-r--r--net/tools/quic/quic_epoll_clock.cc2
-rw-r--r--net/tools/quic/quic_epoll_connection_helper.cc2
-rw-r--r--net/tools/quic/quic_in_memory_cache.cc2
-rw-r--r--net/tools/quic/quic_in_memory_cache.h6
-rw-r--r--net/tools/quic/quic_in_memory_cache_test.cc2
-rw-r--r--net/tools/quic/quic_reliable_client_stream.h4
-rw-r--r--net/tools/quic/quic_reliable_client_stream_test.cc2
-rw-r--r--net/tools/quic/quic_reliable_server_stream.h2
-rw-r--r--net/tools/quic/quic_reliable_server_stream_test.cc2
-rw-r--r--net/tools/quic/quic_server.h2
-rw-r--r--net/tools/quic/quic_server_session_test.cc2
-rw-r--r--net/tools/quic/quic_time_wait_list_manager.h2
-rw-r--r--net/tools/quic/spdy_utils.cc2
-rw-r--r--net/tools/quic/spdy_utils.h2
-rw-r--r--net/tools/quic/test_tools/http_message_test_utils.h4
-rw-r--r--net/tools/quic/test_tools/mock_epoll_server.h2
-rw-r--r--net/tools/quic/test_tools/mock_quic_dispatcher.h2
-rw-r--r--net/tools/quic/test_tools/quic_test_client.cc2
61 files changed, 329 insertions, 177 deletions
diff --git a/net/net.gyp b/net/net.gyp
index 7f6a7fc..9bb0024 100644
--- a/net/net.gyp
+++ b/net/net.gyp
@@ -1903,19 +1903,18 @@
'conditions': [
['os_posix == 1 and OS != "mac" and OS != "ios" and OS != "android"', {
'dependencies': [
- 'quic_library',
- 'flip_in_mem_edsm_server_library',
- 'flip_balsa_and_epoll_library',
+ 'balsa',
+ 'epoll_server',
+ 'flip_in_mem_edsm_server_base',
+ 'quic_base',
],
'sources': [
- 'tools/flip_server/balsa_frame_test.cc',
- 'tools/flip_server/balsa_headers_test.cc',
+ 'tools/balsa/balsa_frame_test.cc',
+ 'tools/balsa/balsa_headers_test.cc',
'tools/flip_server/flip_test_utils.cc',
'tools/flip_server/flip_test_utils.h',
'tools/flip_server/http_interface_test.cc',
'tools/flip_server/mem_cache_test.cc',
- 'tools/flip_server/simple_buffer.cc',
- 'tools/flip_server/simple_buffer.h',
'tools/flip_server/spdy_interface_test.cc',
'tools/quic/end_to_end_test.cc',
'tools/quic/quic_client_session_test.cc',
@@ -2647,33 +2646,44 @@
['os_posix == 1 and OS != "mac" and OS != "ios" and OS != "android"', {
'targets': [
{
- 'target_name': 'flip_balsa_and_epoll_library',
+ 'target_name': 'balsa',
'type': 'static_library',
'dependencies': [
'../base/base.gyp:base',
'net',
],
'sources': [
- 'tools/flip_server/balsa_enums.h',
- 'tools/flip_server/balsa_frame.cc',
- 'tools/flip_server/balsa_frame.h',
- 'tools/flip_server/balsa_headers.cc',
- 'tools/flip_server/balsa_headers.h',
- 'tools/flip_server/balsa_headers_token_utils.cc',
- 'tools/flip_server/balsa_headers_token_utils.h',
- 'tools/flip_server/balsa_visitor_interface.h',
- 'tools/flip_server/constants.h',
- 'tools/flip_server/epoll_server.cc',
- 'tools/flip_server/epoll_server.h',
- 'tools/flip_server/http_message_constants.cc',
- 'tools/flip_server/http_message_constants.h',
- 'tools/flip_server/noop_balsa_visitor.h',
- 'tools/flip_server/split.h',
- 'tools/flip_server/split.cc',
+ 'tools/balsa/balsa_enums.h',
+ 'tools/balsa/balsa_frame.cc',
+ 'tools/balsa/balsa_frame.h',
+ 'tools/balsa/balsa_headers.cc',
+ 'tools/balsa/balsa_headers.h',
+ 'tools/balsa/balsa_headers_token_utils.cc',
+ 'tools/balsa/balsa_headers_token_utils.h',
+ 'tools/balsa/balsa_visitor_interface.h',
+ 'tools/balsa/http_message_constants.cc',
+ 'tools/balsa/http_message_constants.h',
+ 'tools/balsa/noop_balsa_visitor.h',
+ 'tools/balsa/simple_buffer.cc',
+ 'tools/balsa/simple_buffer.h',
+ 'tools/balsa/split.cc',
+ 'tools/balsa/split.h',
],
},
{
- 'target_name': 'flip_in_mem_edsm_server_library',
+ 'target_name': 'epoll_server',
+ 'type': 'static_library',
+ 'dependencies': [
+ '../base/base.gyp:base',
+ 'net',
+ ],
+ 'sources': [
+ 'tools/epoll_server/epoll_server.cc',
+ 'tools/epoll_server/epoll_server.h',
+ ],
+ },
+ {
+ 'target_name': 'flip_in_mem_edsm_server_base',
'type': 'static_library',
'cflags': [
'-Wno-deprecated',
@@ -2681,7 +2691,8 @@
'dependencies': [
'../base/base.gyp:base',
'../third_party/openssl/openssl.gyp:openssl',
- 'flip_balsa_and_epoll_library',
+ 'balsa',
+ 'epoll_server',
'net',
],
'sources': [
@@ -2691,9 +2702,9 @@
'tools/dump_cache/url_utilities.cc',
'tools/flip_server/acceptor_thread.h',
'tools/flip_server/acceptor_thread.cc',
- 'tools/flip_server/buffer_interface.h',
'tools/flip_server/create_listener.cc',
'tools/flip_server/create_listener.h',
+ 'tools/flip_server/constants.h',
'tools/flip_server/flip_config.cc',
'tools/flip_server/flip_config.h',
'tools/flip_server/http_interface.cc',
@@ -2705,8 +2716,6 @@
'tools/flip_server/output_ordering.h',
'tools/flip_server/ring_buffer.cc',
'tools/flip_server/ring_buffer.h',
- 'tools/flip_server/simple_buffer.cc',
- 'tools/flip_server/simple_buffer.h',
'tools/flip_server/sm_connection.cc',
'tools/flip_server/sm_connection.h',
'tools/flip_server/sm_interface.h',
@@ -2729,8 +2738,7 @@
],
'dependencies': [
'../base/base.gyp:base',
- 'flip_balsa_and_epoll_library',
- 'flip_in_mem_edsm_server_library',
+ 'flip_in_mem_edsm_server_base',
'net',
],
'sources': [
@@ -2738,7 +2746,7 @@
],
},
{
- 'target_name': 'quic_library',
+ 'target_name': 'quic_base',
'type': 'static_library',
'dependencies': [
'../base/base.gyp:base',
@@ -2746,7 +2754,8 @@
'../crypto/crypto.gyp:crypto',
'../third_party/openssl/openssl.gyp:openssl',
'../url/url.gyp:url_lib',
- 'flip_balsa_and_epoll_library',
+ 'balsa',
+ 'epoll_server',
'net',
],
'sources': [
@@ -2790,7 +2799,7 @@
'../base/base.gyp:base',
'../third_party/openssl/openssl.gyp:openssl',
'net',
- 'quic_library',
+ 'quic_base',
],
'sources': [
'tools/quic/quic_client_bin.cc',
@@ -2803,7 +2812,7 @@
'../base/base.gyp:base',
'../third_party/openssl/openssl.gyp:openssl',
'net',
- 'quic_library',
+ 'quic_base',
],
'sources': [
'tools/quic/quic_server_bin.cc',
diff --git a/net/tools/DEPS b/net/tools/DEPS
index 90fa4c0..1ea12e4 100644
--- a/net/tools/DEPS
+++ b/net/tools/DEPS
@@ -1,3 +1,4 @@
skip_child_includes = [
+ "balsa",
"flip_server",
]
diff --git a/net/tools/flip_server/balsa_enums.h b/net/tools/balsa/balsa_enums.h
index 4273ee4..a59dcda 100644
--- a/net/tools/flip_server/balsa_enums.h
+++ b/net/tools/balsa/balsa_enums.h
@@ -1,9 +1,9 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Copyright 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef NET_TOOLS_FLIP_SERVER_BALSA_ENUMS_H_
-#define NET_TOOLS_FLIP_SERVER_BALSA_ENUMS_H_
+#ifndef NET_TOOLS_BALSA_BALSA_ENUMS_H_
+#define NET_TOOLS_BALSA_BALSA_ENUMS_H_
namespace net {
@@ -107,5 +107,5 @@ struct BalsaHeadersEnums {
} // namespace net
-#endif // NET_TOOLS_FLIP_SERVER_BALSA_ENUMS_H_
+#endif // NET_TOOLS_BALSA_BALSA_ENUMS_H_
diff --git a/net/tools/flip_server/balsa_frame.cc b/net/tools/balsa/balsa_frame.cc
index dead665..1103ef1 100644
--- a/net/tools/flip_server/balsa_frame.cc
+++ b/net/tools/balsa/balsa_frame.cc
@@ -1,8 +1,8 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "net/tools/flip_server/balsa_frame.h"
+#include "net/tools/balsa/balsa_frame.h"
#include <assert.h>
#if __SSE2__
@@ -18,13 +18,13 @@
#include "base/logging.h"
#include "base/port.h"
#include "base/strings/string_piece.h"
-#include "net/tools/flip_server/balsa_enums.h"
-#include "net/tools/flip_server/balsa_headers.h"
-#include "net/tools/flip_server/balsa_visitor_interface.h"
-#include "net/tools/flip_server/buffer_interface.h"
-#include "net/tools/flip_server/simple_buffer.h"
-#include "net/tools/flip_server/split.h"
-#include "net/tools/flip_server/string_piece_utils.h"
+#include "net/tools/balsa/balsa_enums.h"
+#include "net/tools/balsa/balsa_headers.h"
+#include "net/tools/balsa/balsa_visitor_interface.h"
+#include "net/tools/balsa/buffer_interface.h"
+#include "net/tools/balsa/simple_buffer.h"
+#include "net/tools/balsa/split.h"
+#include "net/tools/balsa/string_piece_utils.h"
namespace net {
diff --git a/net/tools/flip_server/balsa_frame.h b/net/tools/balsa/balsa_frame.h
index 0d3b372..8e1240c 100644
--- a/net/tools/flip_server/balsa_frame.h
+++ b/net/tools/balsa/balsa_frame.h
@@ -1,9 +1,9 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef NET_TOOLS_FLIP_SERVER_BALSA_FRAME_H_
-#define NET_TOOLS_FLIP_SERVER_BALSA_FRAME_H_
+#ifndef NET_TOOLS_BALSA_BALSA_FRAME_H_
+#define NET_TOOLS_BALSA_BALSA_FRAME_H_
#include <strings.h>
@@ -12,12 +12,12 @@
#include "base/compiler_specific.h"
#include "base/port.h"
-#include "net/tools/flip_server/balsa_enums.h"
-#include "net/tools/flip_server/balsa_headers.h"
-#include "net/tools/flip_server/balsa_visitor_interface.h"
-#include "net/tools/flip_server/buffer_interface.h"
-#include "net/tools/flip_server/http_message_constants.h"
-#include "net/tools/flip_server/simple_buffer.h"
+#include "net/tools/balsa/balsa_enums.h"
+#include "net/tools/balsa/balsa_headers.h"
+#include "net/tools/balsa/balsa_visitor_interface.h"
+#include "net/tools/balsa/buffer_interface.h"
+#include "net/tools/balsa/http_message_constants.h"
+#include "net/tools/balsa/simple_buffer.h"
// For additional debug output, uncomment the following:
// #define DEBUGFRAMER 1
@@ -261,5 +261,5 @@ class BalsaFrame {
} // namespace net
-#endif // NET_TOOLS_FLIP_SERVER_BALSA_FRAME_H_
+#endif // NET_TOOLS_BALSA_BALSA_FRAME_H_
diff --git a/net/tools/flip_server/balsa_frame_test.cc b/net/tools/balsa/balsa_frame_test.cc
index 3bb9a42..2582721 100644
--- a/net/tools/flip_server/balsa_frame_test.cc
+++ b/net/tools/balsa/balsa_frame_test.cc
@@ -2,14 +2,14 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "net/tools/flip_server/balsa_frame.h"
+#include "net/tools/balsa/balsa_frame.h"
#include <iterator>
#include "base/memory/scoped_ptr.h"
#include "base/strings/string_piece.h"
-#include "net/tools/flip_server/balsa_enums.h"
-#include "net/tools/flip_server/balsa_headers.h"
+#include "net/tools/balsa/balsa_enums.h"
+#include "net/tools/balsa/balsa_headers.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
diff --git a/net/tools/flip_server/balsa_headers.cc b/net/tools/balsa/balsa_headers.cc
index 040c012..27bfd24 100644
--- a/net/tools/flip_server/balsa_headers.cc
+++ b/net/tools/balsa/balsa_headers.cc
@@ -1,8 +1,8 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "net/tools/flip_server/balsa_headers.h"
+#include "net/tools/balsa/balsa_headers.h"
#include <stdio.h>
#include <algorithm>
@@ -13,14 +13,12 @@
#include "base/logging.h"
#include "base/port.h"
-#include "base/strings/stringprintf.h"
#include "base/strings/string_piece.h"
-#include "net/tools/flip_server/balsa_enums.h"
-#include "net/tools/flip_server/buffer_interface.h"
-#include "net/tools/flip_server/simple_buffer.h"
+#include "base/strings/stringprintf.h"
+#include "net/tools/balsa/balsa_enums.h"
+#include "net/tools/balsa/buffer_interface.h"
+#include "net/tools/balsa/simple_buffer.h"
#include "third_party/tcmalloc/chromium/src/base/googleinit.h"
-// #include "util/gtl/iterator_adaptors-inl.h"
-// #include "util/gtl/map-util.h"
namespace {
diff --git a/net/tools/flip_server/balsa_headers.h b/net/tools/balsa/balsa_headers.h
index 2c8b083..47cf388 100644
--- a/net/tools/flip_server/balsa_headers.h
+++ b/net/tools/balsa/balsa_headers.h
@@ -1,9 +1,9 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Copyright 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef NET_TOOLS_FLIP_SERVER_BALSA_HEADERS_H_
-#define NET_TOOLS_FLIP_SERVER_BALSA_HEADERS_H_
+#ifndef NET_TOOLS_BALSA_BALSA_HEADERS_H_
+#define NET_TOOLS_BALSA_BALSA_HEADERS_H_
#include <algorithm>
#include <iosfwd>
@@ -15,8 +15,8 @@
#include "base/logging.h"
#include "base/port.h"
#include "base/strings/string_piece.h"
-#include "net/tools/flip_server/balsa_enums.h"
-#include "net/tools/flip_server/string_piece_utils.h"
+#include "net/tools/balsa/balsa_enums.h"
+#include "net/tools/balsa/string_piece_utils.h"
namespace net {
@@ -1135,4 +1135,4 @@ class BalsaHeaders {
} // namespace net
-#endif // NET_TOOLS_FLIP_SERVER_BALSA_HEADERS_H_
+#endif // NET_TOOLS_BALSA_BALSA_HEADERS_H_
diff --git a/net/tools/flip_server/balsa_headers_test.cc b/net/tools/balsa/balsa_headers_test.cc
index 241fee1..da2ad19 100644
--- a/net/tools/flip_server/balsa_headers_test.cc
+++ b/net/tools/balsa/balsa_headers_test.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "net/tools/flip_server/balsa_headers.h"
+#include "net/tools/balsa/balsa_headers.h"
#include <iterator>
#include <string>
@@ -10,7 +10,7 @@
#include "base/memory/scoped_ptr.h"
#include "base/strings/string_piece.h"
-#include "net/tools/flip_server/balsa_enums.h"
+#include "net/tools/balsa/balsa_enums.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace net {
diff --git a/net/tools/flip_server/balsa_headers_token_utils.cc b/net/tools/balsa/balsa_headers_token_utils.cc
index b47debf..c807e05 100644
--- a/net/tools/flip_server/balsa_headers_token_utils.cc
+++ b/net/tools/balsa/balsa_headers_token_utils.cc
@@ -1,9 +1,9 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Copyright 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "net/tools/flip_server/balsa_headers_token_utils.h"
-#include "net/tools/flip_server/string_piece_utils.h"
+#include "net/tools/balsa/balsa_headers_token_utils.h"
+#include "net/tools/balsa/string_piece_utils.h"
namespace net {
diff --git a/net/tools/flip_server/balsa_headers_token_utils.h b/net/tools/balsa/balsa_headers_token_utils.h
index f50c606..aaa0e30 100644
--- a/net/tools/flip_server/balsa_headers_token_utils.h
+++ b/net/tools/balsa/balsa_headers_token_utils.h
@@ -1,15 +1,15 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Copyright 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Utility class that performs basic operations on header value tokens: parsing
// them out, checking for presense of certain tokens, and removing them.
-#ifndef NET_TOOLS_FLIP_SERVER_BALSA_HEADERS_TOKEN_UTILS_H_
-#define NET_TOOLS_FLIP_SERVER_BALSA_HEADERS_TOKEN_UTILS_H_
+#ifndef NET_TOOLS_BALSA_BALSA_HEADERS_TOKEN_UTILS_H_
+#define NET_TOOLS_BALSA_BALSA_HEADERS_TOKEN_UTILS_H_
#include "base/strings/string_piece.h"
-#include "net/tools/flip_server/balsa_headers.h"
+#include "net/tools/balsa/balsa_headers.h"
namespace net {
@@ -57,5 +57,5 @@ class BalsaHeadersTokenUtils {
} // namespace net
-#endif // NET_TOOLS_FLIP_SERVER_BALSA_HEADERS_TOKEN_UTILS_H_
+#endif // NET_TOOLS_BALSA_BALSA_HEADERS_TOKEN_UTILS_H_
diff --git a/net/tools/flip_server/balsa_visitor_interface.h b/net/tools/balsa/balsa_visitor_interface.h
index 2542723..1f24e6d 100644
--- a/net/tools/flip_server/balsa_visitor_interface.h
+++ b/net/tools/balsa/balsa_visitor_interface.h
@@ -1,9 +1,9 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Copyright 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef NET_TOOLS_FLIP_SERVER_BALSA_VISITOR_INTERFACE_H_
-#define NET_TOOLS_FLIP_SERVER_BALSA_VISITOR_INTERFACE_H_
+#ifndef NET_TOOLS_BALSA_BALSA_VISITOR_INTERFACE_H_
+#define NET_TOOLS_BALSA_BALSA_VISITOR_INTERFACE_H_
#include <cstddef>
@@ -177,4 +177,4 @@ class BalsaVisitorInterface {
} // namespace net
-#endif // NET_TOOLS_FLIP_SERVER_BALSA_VISITOR_INTERFACE_H_
+#endif // NET_TOOLS_BALSA_BALSA_VISITOR_INTERFACE_H_
diff --git a/net/tools/flip_server/buffer_interface.h b/net/tools/balsa/buffer_interface.h
index ec061c9..9c01a062 100644
--- a/net/tools/flip_server/buffer_interface.h
+++ b/net/tools/balsa/buffer_interface.h
@@ -1,9 +1,9 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Copyright 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef NET_TOOLS_FLIP_SERVER_BUFFER_INTERFACE_H__
-#define NET_TOOLS_FLIP_SERVER_BUFFER_INTERFACE_H__
+#ifndef NET_TOOLS_BALSA_BUFFER_INTERFACE_H__
+#define NET_TOOLS_BALSA_BUFFER_INTERFACE_H__
namespace net {
@@ -117,5 +117,5 @@ class BufferInterface {
} // namespace net
-#endif // NET_TOOLS_FLIP_SERVER_BUFFER_INTERFACE__H__
+#endif // NET_TOOLS_BALSA_BUFFER_INTERFACE__H__
diff --git a/net/tools/balsa/http_message_constants.cc b/net/tools/balsa/http_message_constants.cc
new file mode 100644
index 0000000..96a9725
--- /dev/null
+++ b/net/tools/balsa/http_message_constants.cc
@@ -0,0 +1,146 @@
+// Copyright 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "net/tools/balsa/http_message_constants.h"
+
+namespace net {
+
+const char* get_http_status_message(int status_message) {
+ switch (status_message) {
+ case 100:
+ return "Continue";
+ case 101:
+ return "Switching Protocols";
+ case 200:
+ return "OK";
+ case 201:
+ return "Created";
+ case 202:
+ return "Accepted";
+ case 203:
+ return "Non-Authoritative Information";
+ case 204:
+ return "No Content";
+ case 205:
+ return "Reset Content";
+ case 206:
+ return "Partial Content";
+ case 300:
+ return "Multiple Choices";
+ case 301:
+ return "Moved Permanently";
+ case 302:
+ return "Found";
+ case 303:
+ return "See Other";
+ case 304:
+ return "Not Modified";
+ case 305:
+ return "Use Proxy";
+ case 307:
+ return "Temporary Redirect";
+ case 400:
+ return "Bad Request";
+ case 401:
+ return "Unauthorized";
+ case 402:
+ return "Payment Required";
+ case 403:
+ return "Forbidden";
+ case 404:
+ return "Not Found";
+ case 405:
+ return "Method Not Allowed";
+ case 406:
+ return "Not Acceptable";
+ case 407:
+ return "Proxy Authentication Required";
+ case 408:
+ return "Request Time-out";
+ case 409:
+ return "Conflict";
+ case 410:
+ return "Gone";
+ case 411:
+ return "Length Required";
+ case 412:
+ return "Precondition Failed";
+ case 413:
+ return "Request Entity Too Large";
+ case 414:
+ return "Request-URI Too Large";
+ case 415:
+ return "Unsupported Media Type";
+ case 416:
+ return "Requested range not satisfiable";
+ case 417:
+ return "Expectation Failed";
+ case 500:
+ return "Internal Server Error";
+ case 501:
+ return "Not Implemented";
+ case 502:
+ return "Bad Gateway";
+ case 503:
+ return "Service Unavailable";
+ case 504:
+ return "Gateway Time-out";
+ case 505:
+ return "HTTP Version not supported";
+ }
+ return "unknown";
+}
+
+////////////////////////////////////////////////////////////////////////////////
+
+const int http_status_codes[] = {
+ 100,
+ 101,
+ 200,
+ 201,
+ 202,
+ 203,
+ 204,
+ 205,
+ 206,
+ 300,
+ 301,
+ 302,
+ 303,
+ 304,
+ 305,
+ 307,
+ 400,
+ 401,
+ 402,
+ 403,
+ 404,
+ 405,
+ 406,
+ 407,
+ 408,
+ 409,
+ 410,
+ 411,
+ 412,
+ 413,
+ 414,
+ 415,
+ 416,
+ 417,
+ 500,
+ 501,
+ 502,
+ 503,
+ 504,
+ 505
+};
+
+////////////////////////////////////////////////////////////////////////////////
+
+const int http_status_code_count = sizeof(http_status_codes) /
+ sizeof(http_status_codes[0]);
+
+} // namespace net
+
diff --git a/net/tools/flip_server/http_message_constants.h b/net/tools/balsa/http_message_constants.h
index de700cc..16f7aa3 100644
--- a/net/tools/flip_server/http_message_constants.h
+++ b/net/tools/balsa/http_message_constants.h
@@ -1,9 +1,9 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Copyright 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef NET_TOOLS_FLIP_SERVER_HTTP_MESSAGE_CONSTANTS_H__
-#define NET_TOOLS_FLIP_SERVER_HTTP_MESSAGE_CONSTANTS_H__
+#ifndef NET_TOOLS_BALSA_HTTP_MESSAGE_CONSTANTS_H__
+#define NET_TOOLS_BALSA_HTTP_MESSAGE_CONSTANTS_H__
namespace net {
@@ -13,5 +13,5 @@ extern const int http_status_code_count;
} // namespace net
-#endif // NET_TOOLS_FLIP_SERVER_HTTP_MESSAGE_CONSTANTS_H__
+#endif // NET_TOOLS_BALSA_HTTP_MESSAGE_CONSTANTS_H__
diff --git a/net/tools/flip_server/noop_balsa_visitor.h b/net/tools/balsa/noop_balsa_visitor.h
index 04f4aa6..c0136f1 100644
--- a/net/tools/flip_server/noop_balsa_visitor.h
+++ b/net/tools/balsa/noop_balsa_visitor.h
@@ -6,10 +6,10 @@
// Intended to be used as a base class for BalsaVisitorInterface subclasses that
// only need to override a small number of methods.
-#ifndef NET_TOOLS_FLIP_SERVER_NOOP_BALSA_VISITOR_H_
-#define NET_TOOLS_FLIP_SERVER_NOOP_BALSA_VISITOR_H_
+#ifndef NET_TOOLS_BALSA_NOOP_BALSA_VISITOR_H_
+#define NET_TOOLS_BALSA_NOOP_BALSA_VISITOR_H_
-#include "net/tools/flip_server/balsa_visitor_interface.h"
+#include "net/tools/balsa/balsa_visitor_interface.h"
namespace net {
@@ -57,4 +57,4 @@ class NoOpBalsaVisitor : public BalsaVisitorInterface {
} // namespace net
-#endif // NET_TOOLS_FLIP_SERVER_NOOP_BALSA_VISITOR_H_
+#endif // NET_TOOLS_BALSA_NOOP_BALSA_VISITOR_H_
diff --git a/net/tools/flip_server/simple_buffer.cc b/net/tools/balsa/simple_buffer.cc
index d94153b..5e02a7b 100644
--- a/net/tools/flip_server/simple_buffer.cc
+++ b/net/tools/balsa/simple_buffer.cc
@@ -1,8 +1,8 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Copyright 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "net/tools/flip_server/simple_buffer.h"
+#include "net/tools/balsa/simple_buffer.h"
#include "base/logging.h"
// Some of the following member functions are marked inlined, even though they
diff --git a/net/tools/flip_server/simple_buffer.h b/net/tools/balsa/simple_buffer.h
index 08f7d38..a550617 100644
--- a/net/tools/flip_server/simple_buffer.h
+++ b/net/tools/balsa/simple_buffer.h
@@ -1,14 +1,14 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef NET_TOOLS_FLIP_SERVER_SIMPLE_BUFFER_H__
-#define NET_TOOLS_FLIP_SERVER_SIMPLE_BUFFER_H__
+#ifndef NET_TOOLS_BALSA_SIMPLE_BUFFER_H__
+#define NET_TOOLS_BALSA_SIMPLE_BUFFER_H__
#include <string>
#include "base/compiler_specific.h"
-#include "net/tools/flip_server/buffer_interface.h"
+#include "net/tools/balsa/buffer_interface.h"
namespace net {
@@ -89,4 +89,4 @@ class SimpleBuffer : public BufferInterface {
} // namespace net
-#endif // NET_TOOLS_FLIP_SERVER_SIMPLE_BUFFER_H__
+#endif // NET_TOOLS_BALSA_SIMPLE_BUFFER_H__
diff --git a/net/tools/flip_server/split.cc b/net/tools/balsa/split.cc
index 7900513..20be430 100644
--- a/net/tools/flip_server/split.cc
+++ b/net/tools/balsa/split.cc
@@ -1,8 +1,8 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Copyright 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "net/tools/flip_server/split.h"
+#include "net/tools/balsa/split.h"
#include <string.h>
diff --git a/net/tools/flip_server/split.h b/net/tools/balsa/split.h
index aae20b0..6901c2d 100644
--- a/net/tools/flip_server/split.h
+++ b/net/tools/balsa/split.h
@@ -1,9 +1,9 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Copyright 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef NET_TOOLS_FLIP_SERVER_SPLIT_H_
-#define NET_TOOLS_FLIP_SERVER_SPLIT_H_
+#ifndef NET_TOOLS_BALSA_SPLIT_H_
+#define NET_TOOLS_BALSA_SPLIT_H_
#include <vector>
#include "base/strings/string_piece.h"
@@ -19,5 +19,5 @@ void SplitStringPieceToVector(const base::StringPiece& full,
} // namespace net
-#endif // NET_TOOLS_FLIP_SERVER_SPLIT_H_
+#endif // NET_TOOLS_BALSA_SPLIT_H_
diff --git a/net/tools/flip_server/string_piece_utils.h b/net/tools/balsa/string_piece_utils.h
index 3c46dd9..eb0eaf3 100644
--- a/net/tools/flip_server/string_piece_utils.h
+++ b/net/tools/balsa/string_piece_utils.h
@@ -1,9 +1,9 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef NET_TOOLS_FLIP_SERVER_STRING_PIECE_UTILS_H_
-#define NET_TOOLS_FLIP_SERVER_STRING_PIECE_UTILS_H_
+#ifndef NET_TOOLS_BALSA_STRING_PIECE_UTILS_H_
+#define NET_TOOLS_BALSA_STRING_PIECE_UTILS_H_
#include <ctype.h>
@@ -79,5 +79,5 @@ struct StringPieceCaseEqual {
} // namespace net
-#endif // NET_TOOLS_FLIP_SERVER_STRING_PIECE_UTILS_H_
+#endif // NET_TOOLS_BALSA_STRING_PIECE_UTILS_H_
diff --git a/net/tools/flip_server/epoll_server.cc b/net/tools/epoll_server/epoll_server.cc
index 0e09a6d..a382dba 100644
--- a/net/tools/flip_server/epoll_server.cc
+++ b/net/tools/epoll_server/epoll_server.cc
@@ -1,8 +1,8 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "net/tools/flip_server/epoll_server.h"
+#include "net/tools/epoll_server/epoll_server.h"
#include <unistd.h> // For read, pipe, close and write.
#include <stdlib.h> // for abort
diff --git a/net/tools/flip_server/epoll_server.h b/net/tools/epoll_server/epoll_server.h
index 2fb7c62..8822450 100644
--- a/net/tools/flip_server/epoll_server.h
+++ b/net/tools/epoll_server/epoll_server.h
@@ -1,16 +1,16 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef NET_TOOLS_FLIP_SERVER_EPOLL_SERVER_H_
-#define NET_TOOLS_FLIP_SERVER_EPOLL_SERVER_H_
+#ifndef NET_TOOLS_EPOLL_SERVER_EPOLL_SERVER_H_
+#define NET_TOOLS_EPOLL_SERVER_EPOLL_SERVER_H_
#include <fcntl.h>
#include <sys/queue.h>
#include <map>
+#include <set>
#include <string>
#include <utility>
-#include <set>
#include <vector>
// #define EPOLL_SERVER_EVENT_TRACING 1
@@ -1050,5 +1050,4 @@ class EpollAlarm : public EpollAlarmCallbackInterface {
} // namespace net
-#endif // NET_TOOLS_FLIP_SERVER_EPOLL_SERVER_H_
-
+#endif // NET_TOOLS_EPOLL_SERVER_EPOLL_SERVER_H_
diff --git a/net/tools/flip_server/acceptor_thread.h b/net/tools/flip_server/acceptor_thread.h
index f967fac..7c758d9 100644
--- a/net/tools/flip_server/acceptor_thread.h
+++ b/net/tools/flip_server/acceptor_thread.h
@@ -11,7 +11,7 @@
#include "base/compiler_specific.h"
#include "base/threading/simple_thread.h"
-#include "net/tools/flip_server/epoll_server.h"
+#include "net/tools/epoll_server/epoll_server.h"
#include "net/tools/flip_server/sm_interface.h"
#include "openssl/ssl.h"
diff --git a/net/tools/flip_server/flip_in_mem_edsm_server.cc b/net/tools/flip_server/flip_in_mem_edsm_server.cc
index ce7ffb8..79f3e5b 100644
--- a/net/tools/flip_server/flip_in_mem_edsm_server.cc
+++ b/net/tools/flip_server/flip_in_mem_edsm_server.cc
@@ -15,6 +15,7 @@
#include "base/logging.h"
#include "base/synchronization/lock.h"
#include "base/timer/timer.h"
+#include "net/tools/balsa/split.h"
#include "net/tools/flip_server/acceptor_thread.h"
#include "net/tools/flip_server/constants.h"
#include "net/tools/flip_server/flip_config.h"
@@ -22,7 +23,6 @@
#include "net/tools/flip_server/sm_connection.h"
#include "net/tools/flip_server/sm_interface.h"
#include "net/tools/flip_server/spdy_interface.h"
-#include "net/tools/flip_server/split.h"
#include "net/tools/flip_server/streamer_interface.h"
using std::cout;
@@ -421,4 +421,3 @@ int main (int argc, char**argv)
close(pidfile_fd);
return 0;
}
-
diff --git a/net/tools/flip_server/http_interface.cc b/net/tools/flip_server/http_interface.cc
index 916ba51..78c42cc 100644
--- a/net/tools/flip_server/http_interface.cc
+++ b/net/tools/flip_server/http_interface.cc
@@ -4,8 +4,8 @@
#include "net/tools/flip_server/http_interface.h"
+#include "net/tools/balsa/balsa_frame.h"
#include "net/tools/dump_cache/url_utilities.h"
-#include "net/tools/flip_server/balsa_frame.h"
#include "net/tools/flip_server/flip_config.h"
#include "net/tools/flip_server/sm_connection.h"
#include "net/tools/flip_server/spdy_util.h"
diff --git a/net/tools/flip_server/http_interface.h b/net/tools/flip_server/http_interface.h
index 18e616d..867e342 100644
--- a/net/tools/flip_server/http_interface.h
+++ b/net/tools/flip_server/http_interface.h
@@ -8,8 +8,8 @@
#include <string>
#include "base/compiler_specific.h"
-#include "net/tools/flip_server/balsa_headers.h"
-#include "net/tools/flip_server/balsa_visitor_interface.h"
+#include "net/tools/balsa/balsa_headers.h"
+#include "net/tools/balsa/balsa_visitor_interface.h"
#include "net/tools/flip_server/output_ordering.h"
#include "net/tools/flip_server/sm_connection.h"
#include "net/tools/flip_server/sm_interface.h"
diff --git a/net/tools/flip_server/http_interface_test.cc b/net/tools/flip_server/http_interface_test.cc
index ba9b3aa..c6e3c64 100644
--- a/net/tools/flip_server/http_interface_test.cc
+++ b/net/tools/flip_server/http_interface_test.cc
@@ -9,9 +9,9 @@
#include "base/memory/scoped_ptr.h"
#include "base/stl_util.h"
#include "base/strings/string_piece.h"
-#include "net/tools/flip_server/balsa_enums.h"
-#include "net/tools/flip_server/balsa_frame.h"
-#include "net/tools/flip_server/balsa_headers.h"
+#include "net/tools/balsa/balsa_enums.h"
+#include "net/tools/balsa/balsa_frame.h"
+#include "net/tools/balsa/balsa_headers.h"
#include "net/tools/flip_server/flip_config.h"
#include "net/tools/flip_server/flip_test_utils.h"
#include "net/tools/flip_server/mem_cache.h"
diff --git a/net/tools/flip_server/mem_cache.cc b/net/tools/flip_server/mem_cache.cc
index d1e0e58..42d9343 100644
--- a/net/tools/flip_server/mem_cache.cc
+++ b/net/tools/flip_server/mem_cache.cc
@@ -17,10 +17,10 @@
#include <string>
#include "base/strings/string_util.h"
+#include "net/tools/balsa/balsa_frame.h"
+#include "net/tools/balsa/balsa_headers.h"
#include "net/tools/dump_cache/url_to_filename_encoder.h"
#include "net/tools/dump_cache/url_utilities.h"
-#include "net/tools/flip_server/balsa_frame.h"
-#include "net/tools/flip_server/balsa_headers.h"
namespace {
// The directory where cache locates);
diff --git a/net/tools/flip_server/mem_cache.h b/net/tools/flip_server/mem_cache.h
index 300c84a..b059f02 100644
--- a/net/tools/flip_server/mem_cache.h
+++ b/net/tools/flip_server/mem_cache.h
@@ -10,8 +10,8 @@
#include "base/compiler_specific.h"
#include "base/memory/scoped_ptr.h"
-#include "net/tools/flip_server/balsa_headers.h"
-#include "net/tools/flip_server/balsa_visitor_interface.h"
+#include "net/tools/balsa/balsa_headers.h"
+#include "net/tools/balsa/balsa_visitor_interface.h"
#include "net/tools/flip_server/constants.h"
namespace net {
diff --git a/net/tools/flip_server/mem_cache_test.cc b/net/tools/flip_server/mem_cache_test.cc
index d5601ac..59bc485 100644
--- a/net/tools/flip_server/mem_cache_test.cc
+++ b/net/tools/flip_server/mem_cache_test.cc
@@ -4,7 +4,7 @@
#include "net/tools/flip_server/mem_cache.h"
-#include "net/tools/flip_server/balsa_headers.h"
+#include "net/tools/balsa/balsa_headers.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace net {
diff --git a/net/tools/flip_server/output_ordering.h b/net/tools/flip_server/output_ordering.h
index 922d03f..c1441f0 100644
--- a/net/tools/flip_server/output_ordering.h
+++ b/net/tools/flip_server/output_ordering.h
@@ -11,8 +11,8 @@
#include "base/basictypes.h"
#include "base/compiler_specific.h"
+#include "net/tools/epoll_server/epoll_server.h"
#include "net/tools/flip_server/constants.h"
-#include "net/tools/flip_server/epoll_server.h"
#include "net/tools/flip_server/mem_cache.h"
namespace net {
diff --git a/net/tools/flip_server/ring_buffer.h b/net/tools/flip_server/ring_buffer.h
index 03cbde7..ef660c3 100644
--- a/net/tools/flip_server/ring_buffer.h
+++ b/net/tools/flip_server/ring_buffer.h
@@ -7,7 +7,7 @@
#include "base/compiler_specific.h"
#include "base/memory/scoped_ptr.h"
-#include "net/tools/flip_server/buffer_interface.h"
+#include "net/tools/balsa/buffer_interface.h"
namespace net {
diff --git a/net/tools/flip_server/sm_connection.h b/net/tools/flip_server/sm_connection.h
index 3e21772..a79dca9 100644
--- a/net/tools/flip_server/sm_connection.h
+++ b/net/tools/flip_server/sm_connection.h
@@ -12,8 +12,8 @@
#include <string>
#include "base/compiler_specific.h"
+#include "net/tools/epoll_server/epoll_server.h"
#include "net/tools/flip_server/create_listener.h"
-#include "net/tools/flip_server/epoll_server.h"
#include "net/tools/flip_server/mem_cache.h"
#include "net/tools/flip_server/ring_buffer.h"
#include "net/tools/flip_server/sm_interface.h"
diff --git a/net/tools/flip_server/sm_interface.h b/net/tools/flip_server/sm_interface.h
index 5bc942f..28e5bc6 100644
--- a/net/tools/flip_server/sm_interface.h
+++ b/net/tools/flip_server/sm_interface.h
@@ -9,7 +9,7 @@
#include <string>
-#include "net/tools/flip_server/balsa_headers.h"
+#include "net/tools/balsa/balsa_headers.h"
namespace net {
diff --git a/net/tools/flip_server/spdy_interface.h b/net/tools/flip_server/spdy_interface.h
index 3ce1f3b..3b2e513 100644
--- a/net/tools/flip_server/spdy_interface.h
+++ b/net/tools/flip_server/spdy_interface.h
@@ -12,8 +12,8 @@
#include "base/compiler_specific.h"
#include "net/spdy/buffered_spdy_framer.h"
#include "net/spdy/spdy_protocol.h"
-#include "net/tools/flip_server/balsa_headers.h"
-#include "net/tools/flip_server/balsa_visitor_interface.h"
+#include "net/tools/balsa/balsa_headers.h"
+#include "net/tools/balsa/balsa_visitor_interface.h"
#include "net/tools/flip_server/output_ordering.h"
#include "net/tools/flip_server/sm_connection.h"
#include "net/tools/flip_server/sm_interface.h"
diff --git a/net/tools/flip_server/spdy_interface_test.cc b/net/tools/flip_server/spdy_interface_test.cc
index 7a1c6e9..4dbfea8 100644
--- a/net/tools/flip_server/spdy_interface_test.cc
+++ b/net/tools/flip_server/spdy_interface_test.cc
@@ -9,8 +9,8 @@
#include "base/memory/scoped_ptr.h"
#include "base/strings/string_piece.h"
#include "net/spdy/buffered_spdy_framer.h"
-#include "net/tools/flip_server/balsa_enums.h"
-#include "net/tools/flip_server/balsa_headers.h"
+#include "net/tools/balsa/balsa_enums.h"
+#include "net/tools/balsa/balsa_headers.h"
#include "net/tools/flip_server/flip_config.h"
#include "net/tools/flip_server/flip_test_utils.h"
#include "net/tools/flip_server/mem_cache.h"
diff --git a/net/tools/flip_server/streamer_interface.cc b/net/tools/flip_server/streamer_interface.cc
index b1612e7..8c2e0e7 100644
--- a/net/tools/flip_server/streamer_interface.cc
+++ b/net/tools/flip_server/streamer_interface.cc
@@ -6,7 +6,7 @@
#include <string>
-#include "net/tools/flip_server/balsa_frame.h"
+#include "net/tools/balsa/balsa_frame.h"
#include "net/tools/flip_server/constants.h"
#include "net/tools/flip_server/flip_config.h"
#include "net/tools/flip_server/sm_connection.h"
diff --git a/net/tools/flip_server/streamer_interface.h b/net/tools/flip_server/streamer_interface.h
index 4f09b45..efaee6b 100644
--- a/net/tools/flip_server/streamer_interface.h
+++ b/net/tools/flip_server/streamer_interface.h
@@ -8,8 +8,8 @@
#include <string>
#include "base/compiler_specific.h"
-#include "net/tools/flip_server/balsa_headers.h"
-#include "net/tools/flip_server/balsa_visitor_interface.h"
+#include "net/tools/balsa/balsa_headers.h"
+#include "net/tools/balsa/balsa_visitor_interface.h"
#include "net/tools/flip_server/sm_interface.h"
namespace net {
diff --git a/net/tools/quic/quic_client.cc b/net/tools/quic/quic_client.cc
index 86fa6c4..741d24b 100644
--- a/net/tools/quic/quic_client.cc
+++ b/net/tools/quic/quic_client.cc
@@ -16,7 +16,7 @@
#include "net/quic/quic_connection.h"
#include "net/quic/quic_data_reader.h"
#include "net/quic/quic_protocol.h"
-#include "net/tools/flip_server/balsa_headers.h"
+#include "net/tools/balsa/balsa_headers.h"
#include "net/tools/quic/quic_epoll_connection_helper.h"
#include "net/tools/quic/quic_reliable_client_stream.h"
#include "net/tools/quic/quic_socket_utils.h"
diff --git a/net/tools/quic/quic_client.h b/net/tools/quic/quic_client.h
index 5e89601..8146764 100644
--- a/net/tools/quic/quic_client.h
+++ b/net/tools/quic/quic_client.h
@@ -18,7 +18,7 @@
#include "net/quic/quic_config.h"
#include "net/quic/quic_framer.h"
#include "net/quic/quic_packet_creator.h"
-#include "net/tools/flip_server/epoll_server.h"
+#include "net/tools/epoll_server/epoll_server.h"
#include "net/tools/quic/quic_client_session.h"
#include "net/tools/quic/quic_reliable_client_stream.h"
diff --git a/net/tools/quic/quic_dispatcher.h b/net/tools/quic/quic_dispatcher.h
index aea76cb..465601c 100644
--- a/net/tools/quic/quic_dispatcher.h
+++ b/net/tools/quic/quic_dispatcher.h
@@ -15,7 +15,7 @@
#include "net/base/linked_hash_map.h"
#include "net/quic/quic_blocked_writer_interface.h"
#include "net/quic/quic_protocol.h"
-#include "net/tools/flip_server/epoll_server.h"
+#include "net/tools/epoll_server/epoll_server.h"
#include "net/tools/quic/quic_packet_writer.h"
#include "net/tools/quic/quic_server_session.h"
#include "net/tools/quic/quic_time_wait_list_manager.h"
diff --git a/net/tools/quic/quic_dispatcher_test.cc b/net/tools/quic/quic_dispatcher_test.cc
index 2e2c309..2f105e1 100644
--- a/net/tools/quic/quic_dispatcher_test.cc
+++ b/net/tools/quic/quic_dispatcher_test.cc
@@ -12,7 +12,7 @@
#include "net/quic/crypto/quic_random.h"
#include "net/quic/quic_crypto_stream.h"
#include "net/quic/test_tools/quic_test_utils.h"
-#include "net/tools/flip_server/epoll_server.h"
+#include "net/tools/epoll_server/epoll_server.h"
#include "net/tools/quic/quic_time_wait_list_manager.h"
#include "net/tools/quic/test_tools/quic_test_utils.h"
#include "testing/gmock/include/gmock/gmock.h"
diff --git a/net/tools/quic/quic_epoll_clock.cc b/net/tools/quic/quic_epoll_clock.cc
index 2a3abf1..450afb8 100644
--- a/net/tools/quic/quic_epoll_clock.cc
+++ b/net/tools/quic/quic_epoll_clock.cc
@@ -4,7 +4,7 @@
#include "net/tools/quic/quic_epoll_clock.h"
-#include "net/tools/flip_server/epoll_server.h"
+#include "net/tools/epoll_server/epoll_server.h"
namespace net {
namespace tools {
diff --git a/net/tools/quic/quic_epoll_connection_helper.cc b/net/tools/quic/quic_epoll_connection_helper.cc
index 4db1d4c..9c33847 100644
--- a/net/tools/quic/quic_epoll_connection_helper.cc
+++ b/net/tools/quic/quic_epoll_connection_helper.cc
@@ -11,7 +11,7 @@
#include "base/stl_util.h"
#include "net/base/ip_endpoint.h"
#include "net/quic/crypto/quic_random.h"
-#include "net/tools/flip_server/epoll_server.h"
+#include "net/tools/epoll_server/epoll_server.h"
#include "net/tools/quic/quic_socket_utils.h"
namespace net {
diff --git a/net/tools/quic/quic_in_memory_cache.cc b/net/tools/quic/quic_in_memory_cache.cc
index 791e15f..c7c7cd0 100644
--- a/net/tools/quic/quic_in_memory_cache.cc
+++ b/net/tools/quic/quic_in_memory_cache.cc
@@ -8,7 +8,7 @@
#include "base/files/file_enumerator.h"
#include "base/stl_util.h"
#include "base/strings/string_number_conversions.h"
-#include "net/tools/flip_server/balsa_headers.h"
+#include "net/tools/balsa/balsa_headers.h"
using base::FilePath;
using base::StringPiece;
diff --git a/net/tools/quic/quic_in_memory_cache.h b/net/tools/quic/quic_in_memory_cache.h
index 43b692e..3be25a6 100644
--- a/net/tools/quic/quic_in_memory_cache.h
+++ b/net/tools/quic/quic_in_memory_cache.h
@@ -10,9 +10,9 @@
#include "base/containers/hash_tables.h"
#include "base/memory/singleton.h"
#include "base/strings/string_piece.h"
-#include "net/tools/flip_server/balsa_frame.h"
-#include "net/tools/flip_server/balsa_headers.h"
-#include "net/tools/flip_server/noop_balsa_visitor.h"
+#include "net/tools/balsa/balsa_frame.h"
+#include "net/tools/balsa/balsa_headers.h"
+#include "net/tools/balsa/noop_balsa_visitor.h"
template <typename T> struct DefaultSingletonTraits;
diff --git a/net/tools/quic/quic_in_memory_cache_test.cc b/net/tools/quic/quic_in_memory_cache_test.cc
index a31a986..adcb599 100644
--- a/net/tools/quic/quic_in_memory_cache_test.cc
+++ b/net/tools/quic/quic_in_memory_cache_test.cc
@@ -9,7 +9,7 @@
#include "base/path_service.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_piece.h"
-#include "net/tools/flip_server/balsa_headers.h"
+#include "net/tools/balsa/balsa_headers.h"
#include "net/tools/quic/quic_in_memory_cache.h"
#include "net/tools/quic/test_tools/quic_in_memory_cache_peer.h"
#include "testing/gtest/include/gtest/gtest.h"
diff --git a/net/tools/quic/quic_reliable_client_stream.h b/net/tools/quic/quic_reliable_client_stream.h
index 10b60c2..3944b7fb 100644
--- a/net/tools/quic/quic_reliable_client_stream.h
+++ b/net/tools/quic/quic_reliable_client_stream.h
@@ -11,8 +11,8 @@
#include "base/strings/string_piece.h"
#include "net/quic/quic_protocol.h"
#include "net/quic/reliable_quic_stream.h"
-#include "net/tools/flip_server/balsa_frame.h"
-#include "net/tools/flip_server/balsa_headers.h"
+#include "net/tools/balsa/balsa_frame.h"
+#include "net/tools/balsa/balsa_headers.h"
namespace net {
diff --git a/net/tools/quic/quic_reliable_client_stream_test.cc b/net/tools/quic/quic_reliable_client_stream_test.cc
index af0ffd5..8029024 100644
--- a/net/tools/quic/quic_reliable_client_stream_test.cc
+++ b/net/tools/quic/quic_reliable_client_stream_test.cc
@@ -7,7 +7,7 @@
#include "base/strings/string_number_conversions.h"
#include "net/quic/quic_utils.h"
#include "net/quic/test_tools/quic_test_utils.h"
-#include "net/tools/flip_server/epoll_server.h"
+#include "net/tools/epoll_server/epoll_server.h"
#include "net/tools/quic/quic_client_session.h"
#include "net/tools/quic/quic_spdy_client_stream.h"
#include "net/tools/quic/spdy_utils.h"
diff --git a/net/tools/quic/quic_reliable_server_stream.h b/net/tools/quic/quic_reliable_server_stream.h
index 2ece460..d0a389b 100644
--- a/net/tools/quic/quic_reliable_server_stream.h
+++ b/net/tools/quic/quic_reliable_server_stream.h
@@ -9,7 +9,7 @@
#include "net/quic/quic_protocol.h"
#include "net/quic/reliable_quic_stream.h"
-#include "net/tools/flip_server/balsa_headers.h"
+#include "net/tools/balsa/balsa_headers.h"
namespace net {
diff --git a/net/tools/quic/quic_reliable_server_stream_test.cc b/net/tools/quic/quic_reliable_server_stream_test.cc
index 9de67fa..d33feee 100644
--- a/net/tools/quic/quic_reliable_server_stream_test.cc
+++ b/net/tools/quic/quic_reliable_server_stream_test.cc
@@ -8,7 +8,7 @@
#include "net/quic/quic_spdy_compressor.h"
#include "net/quic/quic_utils.h"
#include "net/quic/test_tools/quic_test_utils.h"
-#include "net/tools/flip_server/epoll_server.h"
+#include "net/tools/epoll_server/epoll_server.h"
#include "net/tools/quic/quic_in_memory_cache.h"
#include "net/tools/quic/quic_spdy_server_stream.h"
#include "net/tools/quic/spdy_utils.h"
diff --git a/net/tools/quic/quic_server.h b/net/tools/quic/quic_server.h
index 90863ce..e537c3b 100644
--- a/net/tools/quic/quic_server.h
+++ b/net/tools/quic/quic_server.h
@@ -13,7 +13,7 @@
#include "net/quic/crypto/crypto_server_config.h"
#include "net/quic/quic_config.h"
#include "net/quic/quic_framer.h"
-#include "net/tools/flip_server/epoll_server.h"
+#include "net/tools/epoll_server/epoll_server.h"
#include "net/tools/quic/quic_dispatcher.h"
namespace net {
diff --git a/net/tools/quic/quic_server_session_test.cc b/net/tools/quic/quic_server_session_test.cc
index a6f94ab..1412f38 100644
--- a/net/tools/quic/quic_server_session_test.cc
+++ b/net/tools/quic/quic_server_session_test.cc
@@ -11,7 +11,7 @@
#include "net/quic/test_tools/quic_connection_peer.h"
#include "net/quic/test_tools/quic_test_utils.h"
#include "net/quic/test_tools/reliable_quic_stream_peer.h"
-#include "net/tools/flip_server/epoll_server.h"
+#include "net/tools/epoll_server/epoll_server.h"
#include "net/tools/quic/quic_spdy_server_stream.h"
#include "net/tools/quic/test_tools/quic_test_utils.h"
#include "testing/gmock/include/gmock/gmock.h"
diff --git a/net/tools/quic/quic_time_wait_list_manager.h b/net/tools/quic/quic_time_wait_list_manager.h
index 815b9d9..739e14b0 100644
--- a/net/tools/quic/quic_time_wait_list_manager.h
+++ b/net/tools/quic/quic_time_wait_list_manager.h
@@ -15,7 +15,7 @@
#include "net/quic/quic_blocked_writer_interface.h"
#include "net/quic/quic_framer.h"
#include "net/quic/quic_protocol.h"
-#include "net/tools/flip_server/epoll_server.h"
+#include "net/tools/epoll_server/epoll_server.h"
#include "net/tools/quic/quic_epoll_clock.h"
#include "net/tools/quic/quic_packet_writer.h"
diff --git a/net/tools/quic/spdy_utils.cc b/net/tools/quic/spdy_utils.cc
index 13d05e5..00eabee 100644
--- a/net/tools/quic/spdy_utils.cc
+++ b/net/tools/quic/spdy_utils.cc
@@ -13,7 +13,7 @@
#include "net/spdy/spdy_frame_builder.h"
#include "net/spdy/spdy_framer.h"
#include "net/spdy/spdy_protocol.h"
-#include "net/tools/flip_server/balsa_headers.h"
+#include "net/tools/balsa/balsa_headers.h"
#include "url/gurl.h"
using base::StringPiece;
diff --git a/net/tools/quic/spdy_utils.h b/net/tools/quic/spdy_utils.h
index 4478274..cfad5f1 100644
--- a/net/tools/quic/spdy_utils.h
+++ b/net/tools/quic/spdy_utils.h
@@ -10,7 +10,7 @@
#include "net/spdy/spdy_framer.h"
#include "net/spdy/spdy_header_block.h"
#include "net/spdy/spdy_protocol.h"
-#include "net/tools/flip_server/balsa_headers.h"
+#include "net/tools/balsa/balsa_headers.h"
namespace net {
namespace tools {
diff --git a/net/tools/quic/test_tools/http_message_test_utils.h b/net/tools/quic/test_tools/http_message_test_utils.h
index d389e21..fefdb49 100644
--- a/net/tools/quic/test_tools/http_message_test_utils.h
+++ b/net/tools/quic/test_tools/http_message_test_utils.h
@@ -9,8 +9,8 @@
#include <vector>
#include "base/strings/string_piece.h"
-#include "net/tools/flip_server/balsa_enums.h"
-#include "net/tools/flip_server/balsa_headers.h"
+#include "net/tools/balsa/balsa_enums.h"
+#include "net/tools/balsa/balsa_headers.h"
namespace net {
namespace tools {
diff --git a/net/tools/quic/test_tools/mock_epoll_server.h b/net/tools/quic/test_tools/mock_epoll_server.h
index 710d5fd..fbc1695 100644
--- a/net/tools/quic/test_tools/mock_epoll_server.h
+++ b/net/tools/quic/test_tools/mock_epoll_server.h
@@ -6,7 +6,7 @@
#define NET_TOOLS_QUIC_TEST_TOOLS_MOCK_EPOLL_SERVER_H_
#include "base/logging.h"
-#include "net/tools/flip_server/epoll_server.h"
+#include "net/tools/epoll_server/epoll_server.h"
#include "testing/gmock/include/gmock/gmock.h"
namespace net {
diff --git a/net/tools/quic/test_tools/mock_quic_dispatcher.h b/net/tools/quic/test_tools/mock_quic_dispatcher.h
index 563ab0d..ac198bc 100644
--- a/net/tools/quic/test_tools/mock_quic_dispatcher.h
+++ b/net/tools/quic/test_tools/mock_quic_dispatcher.h
@@ -9,7 +9,7 @@
#include "net/quic/crypto/crypto_server_config.h"
#include "net/quic/quic_config.h"
#include "net/quic/quic_protocol.h"
-#include "net/tools/flip_server/epoll_server.h"
+#include "net/tools/epoll_server/epoll_server.h"
#include "net/tools/quic/quic_dispatcher.h"
#include "testing/gmock/include/gmock/gmock.h"
diff --git a/net/tools/quic/test_tools/quic_test_client.cc b/net/tools/quic/test_tools/quic_test_client.cc
index 272786e..3aa5cd5 100644
--- a/net/tools/quic/test_tools/quic_test_client.cc
+++ b/net/tools/quic/test_tools/quic_test_client.cc
@@ -9,7 +9,7 @@
#include "net/cert/cert_verify_result.h"
#include "net/cert/x509_certificate.h"
#include "net/quic/crypto/proof_verifier.h"
-#include "net/tools/flip_server/balsa_headers.h"
+#include "net/tools/balsa/balsa_headers.h"
#include "net/tools/quic/quic_epoll_connection_helper.h"
#include "net/tools/quic/quic_spdy_client_stream.h"
#include "net/tools/quic/test_tools/http_message_test_utils.h"