summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2024-05-02 01:03:03 +0000
committerAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2024-05-02 01:03:03 +0000
commita968d71c4018cd98fb6934821da4f144b853e0aa (patch)
treee4af33cd10eb50631b24db09e3c443952cdb72c2
parent21f6057a1c9ce471d0aa937187860f86b23f62eb (diff)
parentb2aa3b0e4a0cf2877bbc01e725045e28e0130564 (diff)
downloadcronet-sdk-release.tar.gz
Snap for 11790536 from b2aa3b0e4a0cf2877bbc01e725045e28e0130564 to sdk-releasesdk-release
Change-Id: I0bbf97b63e118ca4863437d26c212ab2787a7fef
-rw-r--r--components/cronet/android/cronet_library_loader.cc2
-rw-r--r--net/disk_cache/simple/simple_entry_impl.cc2
-rw-r--r--net/disk_cache/simple/simple_synchronous_entry.cc2
-rw-r--r--net/disk_cache/simple/simple_util.cc2
-rw-r--r--net/disk_cache/simple/simple_version_upgrade.cc2
-rw-r--r--net/filter/filter_source_stream_test_util.cc2
-rw-r--r--net/filter/gzip_header.cc2
-rw-r--r--net/filter/gzip_source_stream.cc2
-rw-r--r--net/filter/gzip_source_stream_unittest.cc2
-rw-r--r--net/http/http_cache_transaction.cc1
-rw-r--r--net/http/http_cache_unittest.cc1
-rw-r--r--net/log/trace_net_log_observer_unittest.cc4
-rw-r--r--net/socket/ssl_client_socket_impl.cc1
-rw-r--r--net/spdy/spdy_session.cc1
-rw-r--r--net/spdy/spdy_session_pool.cc1
-rw-r--r--net/test/embedded_test_server/controllable_http_response.cc1
-rw-r--r--net/tools/content_decoder_tool/content_decoder_tool_unittest.cc2
-rw-r--r--net/url_request/FailurePhase.java43
-rw-r--r--net/url_request/url_request_context_builder_unittest.cc3
-rw-r--r--net/websockets/websocket_deflater.cc2
-rw-r--r--net/websockets/websocket_inflater.cc2
-rw-r--r--third_party/zlib/README.md5
-rw-r--r--third_party/zlib/zlib.h12
23 files changed, 34 insertions, 63 deletions
diff --git a/components/cronet/android/cronet_library_loader.cc b/components/cronet/android/cronet_library_loader.cc
index ee080dda9..f95ddda63 100644
--- a/components/cronet/android/cronet_library_loader.cc
+++ b/components/cronet/android/cronet_library_loader.cc
@@ -6,7 +6,6 @@
#include <memory>
#include <string>
#include <utility>
-#include <zlib.h>
#include "base/android/base_jni_onload.h"
#include "base/android/build_info.h"
@@ -38,6 +37,7 @@
#include "net/base/network_change_notifier.h"
#include "net/proxy_resolution/configured_proxy_resolution_service.h"
#include "net/proxy_resolution/proxy_config_service_android.h"
+#include "third_party/zlib/zlib.h"
#include "url/buildflags.h"
#if !BUILDFLAG(USE_PLATFORM_ICU_ALTERNATIVES)
diff --git a/net/disk_cache/simple/simple_entry_impl.cc b/net/disk_cache/simple/simple_entry_impl.cc
index 0ddd8507c..13e312d27 100644
--- a/net/disk_cache/simple/simple_entry_impl.cc
+++ b/net/disk_cache/simple/simple_entry_impl.cc
@@ -9,7 +9,6 @@
#include <limits>
#include <utility>
#include <vector>
-#include <zlib.h>
#include "base/check_op.h"
#include "base/functional/bind.h"
@@ -37,6 +36,7 @@
#include "net/log/net_log.h"
#include "net/log/net_log_source_type.h"
#include "third_party/abseil-cpp/absl/types/optional.h"
+#include "third_party/zlib/zlib.h"
namespace disk_cache {
namespace {
diff --git a/net/disk_cache/simple/simple_synchronous_entry.cc b/net/disk_cache/simple/simple_synchronous_entry.cc
index 5621a2a09..3990b21a1 100644
--- a/net/disk_cache/simple/simple_synchronous_entry.cc
+++ b/net/disk_cache/simple/simple_synchronous_entry.cc
@@ -7,7 +7,6 @@
#include <cstring>
#include <functional>
#include <limits>
-#include <zlib.h>
#include "base/compiler_specific.h"
#include "base/files/file_util.h"
@@ -35,6 +34,7 @@
#include "net/disk_cache/simple/simple_util.h"
#include "third_party/abseil-cpp/absl/container/inlined_vector.h"
#include "third_party/abseil-cpp/absl/types/optional.h"
+#include "third_party/zlib/zlib.h"
using base::FilePath;
using base::Time;
diff --git a/net/disk_cache/simple/simple_util.cc b/net/disk_cache/simple/simple_util.cc
index edd8a9d78..d823335b5 100644
--- a/net/disk_cache/simple/simple_util.cc
+++ b/net/disk_cache/simple/simple_util.cc
@@ -5,7 +5,6 @@
#include "net/disk_cache/simple/simple_util.h"
#include <limits>
-#include <zlib.h>
#include "base/check_op.h"
#include "base/files/file_util.h"
@@ -17,6 +16,7 @@
#include "base/threading/thread_restrictions.h"
#include "base/time/time.h"
#include "net/disk_cache/simple/simple_entry_format.h"
+#include "third_party/zlib/zlib.h"
namespace {
diff --git a/net/disk_cache/simple/simple_version_upgrade.cc b/net/disk_cache/simple/simple_version_upgrade.cc
index 1d6bcce11..09d80c5af 100644
--- a/net/disk_cache/simple/simple_version_upgrade.cc
+++ b/net/disk_cache/simple/simple_version_upgrade.cc
@@ -5,7 +5,6 @@
#include "net/disk_cache/simple/simple_version_upgrade.h"
#include <cstring>
-#include <zlib.h>
#include "base/files/file.h"
#include "base/files/file_enumerator.h"
@@ -17,6 +16,7 @@
#include "net/disk_cache/disk_cache.h"
#include "net/disk_cache/simple/simple_backend_version.h"
#include "net/disk_cache/simple/simple_entry_format_history.h"
+#include "third_party/zlib/zlib.h"
namespace {
diff --git a/net/filter/filter_source_stream_test_util.cc b/net/filter/filter_source_stream_test_util.cc
index 73ccfb75e..2e18235b7 100644
--- a/net/filter/filter_source_stream_test_util.cc
+++ b/net/filter/filter_source_stream_test_util.cc
@@ -5,10 +5,10 @@
#include "net/filter/filter_source_stream_test_util.h"
#include <cstring>
-#include <zlib.h>
#include "base/bit_cast.h"
#include "base/check_op.h"
+#include "third_party/zlib/zlib.h"
namespace net {
diff --git a/net/filter/gzip_header.cc b/net/filter/gzip_header.cc
index b0b1ed62b..69028c17b 100644
--- a/net/filter/gzip_header.cc
+++ b/net/filter/gzip_header.cc
@@ -7,9 +7,9 @@
#include <string.h>
#include <algorithm>
-#include <zlib.h>
#include "base/check_op.h"
+#include "third_party/zlib/zlib.h"
namespace net {
diff --git a/net/filter/gzip_source_stream.cc b/net/filter/gzip_source_stream.cc
index 987b3cfb5..82e6f2a0a 100644
--- a/net/filter/gzip_source_stream.cc
+++ b/net/filter/gzip_source_stream.cc
@@ -7,7 +7,6 @@
#include <algorithm>
#include <memory>
#include <utility>
-#include <zlib.h>
#include "base/bit_cast.h"
#include "base/check_op.h"
@@ -17,6 +16,7 @@
#include "base/notreached.h"
#include "base/numerics/checked_math.h"
#include "net/base/io_buffer.h"
+#include "third_party/zlib/zlib.h"
namespace net {
diff --git a/net/filter/gzip_source_stream_unittest.cc b/net/filter/gzip_source_stream_unittest.cc
index 10187807a..072371ce1 100644
--- a/net/filter/gzip_source_stream_unittest.cc
+++ b/net/filter/gzip_source_stream_unittest.cc
@@ -4,7 +4,6 @@
#include <string>
#include <utility>
-#include <zlib.h>
#include "base/functional/bind.h"
#include "base/functional/callback.h"
@@ -15,6 +14,7 @@
#include "net/filter/gzip_source_stream.h"
#include "net/filter/mock_source_stream.h"
#include "testing/gtest/include/gtest/gtest.h"
+#include "third_party/zlib/zlib.h"
namespace net {
diff --git a/net/http/http_cache_transaction.cc b/net/http/http_cache_transaction.cc
index f348ad8aa..624ed6c25 100644
--- a/net/http/http_cache_transaction.cc
+++ b/net/http/http_cache_transaction.cc
@@ -32,7 +32,6 @@
#include "base/strings/string_util.h" // For EqualsCaseInsensitiveASCII.
#include "base/task/single_thread_task_runner.h"
#include "base/time/clock.h"
-#include "base/trace_event/base_tracing.h"
#include "base/trace_event/common/trace_event_common.h"
#include "base/values.h"
#include "net/base/auth.h"
diff --git a/net/http/http_cache_unittest.cc b/net/http/http_cache_unittest.cc
index f1dfdbb49..366e51a14 100644
--- a/net/http/http_cache_unittest.cc
+++ b/net/http/http_cache_unittest.cc
@@ -29,6 +29,7 @@
#include "base/test/scoped_feature_list.h"
#include "base/test/simple_test_clock.h"
#include "base/time/time.h"
+#include "base/trace_event/memory_allocator_dump.h"
#include "base/trace_event/memory_dump_request_args.h"
#include "base/trace_event/process_memory_dump.h"
#include "net/base/cache_type.h"
diff --git a/net/log/trace_net_log_observer_unittest.cc b/net/log/trace_net_log_observer_unittest.cc
index 9f4d3d17c..fd2b7dd73 100644
--- a/net/log/trace_net_log_observer_unittest.cc
+++ b/net/log/trace_net_log_observer_unittest.cc
@@ -17,7 +17,9 @@
#include "base/run_loop.h"
#include "base/strings/stringprintf.h"
#include "base/test/task_environment.h"
-#include "base/trace_event/base_tracing.h"
+#include "base/trace_event/trace_buffer.h"
+#include "base/trace_event/trace_event.h"
+#include "base/trace_event/trace_event_impl.h"
#include "base/values.h"
#include "net/log/net_log.h"
#include "net/log/net_log_event_type.h"
diff --git a/net/socket/ssl_client_socket_impl.cc b/net/socket/ssl_client_socket_impl.cc
index 77c681805..c5a000cd8 100644
--- a/net/socket/ssl_client_socket_impl.cc
+++ b/net/socket/ssl_client_socket_impl.cc
@@ -27,7 +27,6 @@
#include "base/rand_util.h"
#include "base/strings/string_piece.h"
#include "base/synchronization/lock.h"
-#include "base/trace_event/base_tracing.h"
#include "base/task/sequenced_task_runner.h"
#include "base/values.h"
#include "build/build_config.h"
diff --git a/net/spdy/spdy_session.cc b/net/spdy/spdy_session.cc
index 323d53804..c9f9c4c56 100644
--- a/net/spdy/spdy_session.cc
+++ b/net/spdy/spdy_session.cc
@@ -27,7 +27,6 @@
#include "base/strings/utf_string_conversions.h"
#include "base/task/single_thread_task_runner.h"
#include "base/time/time.h"
-#include "base/trace_event/base_tracing.h"
#include "base/trace_event/memory_usage_estimator.h"
#include "base/values.h"
#include "net/base/features.h"
diff --git a/net/spdy/spdy_session_pool.cc b/net/spdy/spdy_session_pool.cc
index 6e3f85336..23c31f164 100644
--- a/net/spdy/spdy_session_pool.cc
+++ b/net/spdy/spdy_session_pool.cc
@@ -12,7 +12,6 @@
#include "base/functional/bind.h"
#include "base/metrics/histogram_macros.h"
#include "base/ranges/algorithm.h"
-#include "base/trace_event/base_tracing.h"
#include "base/task/single_thread_task_runner.h"
#include "base/values.h"
#include "build/build_config.h"
diff --git a/net/test/embedded_test_server/controllable_http_response.cc b/net/test/embedded_test_server/controllable_http_response.cc
index 57d515c74..c95b76bb1 100644
--- a/net/test/embedded_test_server/controllable_http_response.cc
+++ b/net/test/embedded_test_server/controllable_http_response.cc
@@ -7,7 +7,6 @@
#include "base/check_op.h"
#include "base/functional/bind.h"
#include "base/strings/stringprintf.h"
-#include "base/trace_event/base_tracing.h"
#include "base/task/single_thread_task_runner.h"
#include "net/base/tracing.h"
#include "net/test/embedded_test_server/http_response.h"
diff --git a/net/tools/content_decoder_tool/content_decoder_tool_unittest.cc b/net/tools/content_decoder_tool/content_decoder_tool_unittest.cc
index 92ed6a693..0073b474e 100644
--- a/net/tools/content_decoder_tool/content_decoder_tool_unittest.cc
+++ b/net/tools/content_decoder_tool/content_decoder_tool_unittest.cc
@@ -8,7 +8,6 @@
#include <memory>
#include <ostream>
#include <utility>
-#include <zlib.h>
#include "base/files/file_util.h"
#include "base/path_service.h"
@@ -17,6 +16,7 @@
#include "net/filter/mock_source_stream.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "testing/platform_test.h"
+#include "third_party/zlib/zlib.h"
namespace net {
diff --git a/net/url_request/FailurePhase.java b/net/url_request/FailurePhase.java
deleted file mode 100644
index 00a9ec288..000000000
--- a/net/url_request/FailurePhase.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Copyright (C) 2023 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-// This file is autogenerated by
-// java_cpp_enum.py
-// From
-// ../../net/test/url_request/url_request_failed_job.h
-
-// TODO(b/275689380)
-// genandroidbp does not correctly handle this yet as it is not a separate target in BUID.gn,
-// so manually adding it here till that is fixed.
-
-package org.chromium.net.test;
-
-import androidx.annotation.IntDef;
-
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-
-@IntDef({
- FailurePhase.START, FailurePhase.READ_SYNC, FailurePhase.READ_ASYNC,
- FailurePhase.MAX_FAILURE_PHASE
-})
-@Retention(RetentionPolicy.SOURCE)
-public @interface FailurePhase {
- int START = 0;
- int READ_SYNC = 1;
- int READ_ASYNC = 2;
- int MAX_FAILURE_PHASE = 3;
-}
diff --git a/net/url_request/url_request_context_builder_unittest.cc b/net/url_request/url_request_context_builder_unittest.cc
index f27a7c69e..d0d0e1553 100644
--- a/net/url_request/url_request_context_builder_unittest.cc
+++ b/net/url_request/url_request_context_builder_unittest.cc
@@ -31,7 +31,6 @@
#include "net/traffic_annotation/network_traffic_annotation_test_helper.h"
#include "net/url_request/url_request.h"
#include "net/url_request/url_request_test_util.h"
-#include "net/base/cronet_buildflags.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "testing/platform_test.h"
#include "url/gurl.h"
@@ -190,7 +189,7 @@ TEST_F(URLRequestContextBuilderTest, CustomHttpAuthHandlerFactory) {
host_resolver_.get(), &handler));
}
-#if BUILDFLAG(ENABLE_REPORTING) && !BUILDFLAG(CRONET_BUILD)
+#if BUILDFLAG(ENABLE_REPORTING)
// See crbug.com/935209. This test ensures that shutdown occurs correctly and
// does not crash while destoying the NEL and Reporting services in the process
// of destroying the URLRequestContext whilst Reporting has a pending upload.
diff --git a/net/websockets/websocket_deflater.cc b/net/websockets/websocket_deflater.cc
index 975baebee..f19d431bd 100644
--- a/net/websockets/websocket_deflater.cc
+++ b/net/websockets/websocket_deflater.cc
@@ -8,12 +8,12 @@
#include <algorithm>
#include <vector>
-#include <zlib.h>
#include "base/check.h"
#include "base/check_op.h"
#include "base/containers/circular_deque.h"
#include "net/base/io_buffer.h"
+#include "third_party/zlib/zlib.h"
namespace net {
diff --git a/net/websockets/websocket_inflater.cc b/net/websockets/websocket_inflater.cc
index cfe0c5f3b..09198ed31 100644
--- a/net/websockets/websocket_inflater.cc
+++ b/net/websockets/websocket_inflater.cc
@@ -8,11 +8,11 @@
#include <algorithm>
#include <vector>
-#include <zlib.h>
#include "base/check.h"
#include "base/check_op.h"
#include "net/base/io_buffer.h"
+#include "third_party/zlib/zlib.h"
namespace net {
diff --git a/third_party/zlib/README.md b/third_party/zlib/README.md
new file mode 100644
index 000000000..43e3bac68
--- /dev/null
+++ b/third_party/zlib/README.md
@@ -0,0 +1,5 @@
+This directory was created manually and not imported from Chromium. It was created to remove the
+divergence we had where we had to rename `#include "third_party/zlib/zlib.h"` line to
+`#include <zlib.h>`. This is due to the fact that we don't import Chromium's zlib and we use
+zlib from AOSP. In order to workaround that, we redirect traffic from `third_party/zlib/zlib.h` to
+AOSP's zlib. \ No newline at end of file
diff --git a/third_party/zlib/zlib.h b/third_party/zlib/zlib.h
new file mode 100644
index 000000000..ce946e91b
--- /dev/null
+++ b/third_party/zlib/zlib.h
@@ -0,0 +1,12 @@
+// This directory was created manually and not imported from Chromium. It was created to remove the
+// divergence we had where we had to rename `#include "third_party/zlib/zlib.h"` line to
+// `#include <zlib.h>`. This is due to the fact that we don't import Chromium's zlib and we use
+// zlib from AOSP. In order to workaround that, we redirect traffic from `third_party/zlib/zlib.h` to
+// AOSP's zlib.
+
+#ifndef THIRD_PARTY_ZLIB_ZLIB
+#define THIRD_PARTY_ZLIB_ZLIB
+
+#include <zlib.h>
+
+#endif // THIRD_PARTY_ZLIB_ZLIB \ No newline at end of file