base: add http_server.cc
Move the HTTP server implementation from trace processor to base.
This will be used by next CLs for websocket support outisde of TP.
Build-wise, http_server.cc has its own target, to avoid bloating
binary size of all other binaries depending on base that don't
want the HttpServer.
Bug: 205274609
Change-Id: I674e2c994c76ba01da30036396ac2b964b1e6069
diff --git a/Android.bp b/Android.bp
index bc02fbf..1002d49 100644
--- a/Android.bp
+++ b/Android.bp
@@ -1544,6 +1544,11 @@
name: "perfetto_include_perfetto_ext_base_base",
}
+// GN: //include/perfetto/ext/base/http:http
+filegroup {
+ name: "perfetto_include_perfetto_ext_base_http_http",
+}
+
// GN: //include/perfetto/ext/ipc:ipc
filegroup {
name: "perfetto_include_perfetto_ext_ipc_ipc",
@@ -6888,6 +6893,22 @@
],
}
+// GN: //src/base/http:http
+filegroup {
+ name: "perfetto_src_base_http_http",
+ srcs: [
+ "src/base/http/http_server.cc",
+ ],
+}
+
+// GN: //src/base/http:unittests
+filegroup {
+ name: "perfetto_src_base_http_unittests",
+ srcs: [
+ "src/base/http/http_server_unittest.cc",
+ ],
+}
+
// GN: //src/base:test_support
filegroup {
name: "perfetto_src_base_test_support",
@@ -9202,6 +9223,7 @@
srcs: [
":perfetto_include_perfetto_base_base",
":perfetto_include_perfetto_ext_base_base",
+ ":perfetto_include_perfetto_ext_base_http_http",
":perfetto_include_perfetto_ext_ipc_ipc",
":perfetto_include_perfetto_ext_trace_processor_export_json",
":perfetto_include_perfetto_ext_trace_processor_importers_memory_tracker_memory_tracker",
@@ -9309,6 +9331,8 @@
":perfetto_src_android_stats_android_stats",
":perfetto_src_android_stats_perfetto_atoms",
":perfetto_src_base_base",
+ ":perfetto_src_base_http_http",
+ ":perfetto_src_base_http_unittests",
":perfetto_src_base_test_support",
":perfetto_src_base_unittests",
":perfetto_src_base_unix_socket",
@@ -9622,6 +9646,7 @@
srcs: [
":perfetto_include_perfetto_base_base",
":perfetto_include_perfetto_ext_base_base",
+ ":perfetto_include_perfetto_ext_base_http_http",
":perfetto_include_perfetto_ext_trace_processor_export_json",
":perfetto_include_perfetto_ext_trace_processor_importers_memory_tracker_memory_tracker",
":perfetto_include_perfetto_ext_traced_sys_stats_counters",
@@ -9659,6 +9684,7 @@
":perfetto_protos_perfetto_trace_system_info_zero_gen",
":perfetto_protos_perfetto_trace_track_event_zero_gen",
":perfetto_src_base_base",
+ ":perfetto_src_base_http_http",
":perfetto_src_base_unix_socket",
":perfetto_src_profiling_deobfuscator",
":perfetto_src_profiling_symbolizer_symbolize_database",