mirror of
https://github.com/klzgrad/naiveproxy.git
synced 2024-12-03 18:56:09 +03:00
net: Add Android stubs
This commit is contained in:
parent
02c292fa44
commit
4461baa1e1
@ -1167,36 +1167,21 @@ component("net") {
|
|||||||
|
|
||||||
if (is_android) {
|
if (is_android) {
|
||||||
sources += [
|
sources += [
|
||||||
"android/android_http_util.cc",
|
|
||||||
"android/cellular_signal_strength.cc",
|
|
||||||
"android/cellular_signal_strength.h",
|
"android/cellular_signal_strength.h",
|
||||||
"android/cert_verify_result_android.cc",
|
|
||||||
"android/cert_verify_result_android.h",
|
"android/cert_verify_result_android.h",
|
||||||
"android/gurl_utils.cc",
|
|
||||||
"android/http_auth_negotiate_android.cc",
|
|
||||||
"android/http_auth_negotiate_android.h",
|
"android/http_auth_negotiate_android.h",
|
||||||
"android/keystore.cc",
|
|
||||||
"android/keystore.h",
|
"android/keystore.h",
|
||||||
"android/network_activation_request.cc",
|
|
||||||
"android/network_activation_request.h",
|
"android/network_activation_request.h",
|
||||||
"android/network_change_notifier_android.cc",
|
"android/network_activation_request_stub.cc",
|
||||||
"android/network_change_notifier_android.h",
|
"android/network_change_notifier_android.h",
|
||||||
"android/network_change_notifier_delegate_android.cc",
|
|
||||||
"android/network_change_notifier_delegate_android.h",
|
"android/network_change_notifier_delegate_android.h",
|
||||||
"android/network_change_notifier_factory_android.cc",
|
|
||||||
"android/network_change_notifier_factory_android.h",
|
"android/network_change_notifier_factory_android.h",
|
||||||
"android/network_library.cc",
|
|
||||||
"android/network_library.h",
|
"android/network_library.h",
|
||||||
"android/traffic_stats.cc",
|
"android/network_library_stub.cc",
|
||||||
"android/traffic_stats.h",
|
"android/traffic_stats.h",
|
||||||
"cert/cert_verify_proc_android.cc",
|
|
||||||
"cert/cert_verify_proc_android.h",
|
"cert/cert_verify_proc_android.h",
|
||||||
"cert/test_root_certs_android.cc",
|
"cert/test_root_certs_android.cc",
|
||||||
"cert/x509_util_android.cc",
|
|
||||||
"proxy_resolution/proxy_config_service_android.cc",
|
|
||||||
"proxy_resolution/proxy_config_service_android.h",
|
"proxy_resolution/proxy_config_service_android.h",
|
||||||
"ssl/ssl_platform_key_android.cc",
|
|
||||||
"ssl/ssl_platform_key_android.h",
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1695,7 +1680,7 @@ source_set("net_deps") {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (is_android) {
|
if (is_android) {
|
||||||
public_deps += [ ":net_jni_headers" ]
|
public_deps += []
|
||||||
}
|
}
|
||||||
|
|
||||||
if (is_fuchsia) {
|
if (is_fuchsia) {
|
||||||
@ -1708,7 +1693,7 @@ source_set("net_deps") {
|
|||||||
|
|
||||||
if (use_platform_icu_alternatives) {
|
if (use_platform_icu_alternatives) {
|
||||||
if (is_android) {
|
if (is_android) {
|
||||||
public_deps += [ ":net_jni_headers" ]
|
public_deps += []
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
public_deps += [
|
public_deps += [
|
||||||
@ -1761,9 +1746,6 @@ source_set("net_public_deps") {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (is_android) {
|
if (is_android) {
|
||||||
java_cpp_enum("effective_connection_type_java") {
|
|
||||||
sources = [ "//net/nqe/effective_connection_type.h" ]
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
grit("net_resources") {
|
grit("net_resources") {
|
||||||
|
27
src/net/android/network_activation_request_stub.cc
Normal file
27
src/net/android/network_activation_request_stub.cc
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
// Copyright 2020 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/android/network_activation_request.h"
|
||||||
|
|
||||||
|
namespace net {
|
||||||
|
namespace android {
|
||||||
|
|
||||||
|
NetworkActivationRequest::NetworkActivationRequest(TransportType transport)
|
||||||
|
: task_runner_(base::SequencedTaskRunnerHandle::Get()) {
|
||||||
|
weak_self_ = weak_ptr_factory_.GetWeakPtr();
|
||||||
|
}
|
||||||
|
|
||||||
|
NetworkActivationRequest::~NetworkActivationRequest() {
|
||||||
|
}
|
||||||
|
|
||||||
|
void NetworkActivationRequest::NotifyAvailable(JNIEnv* env,
|
||||||
|
NetworkHandle network) {
|
||||||
|
}
|
||||||
|
|
||||||
|
void NetworkActivationRequest::NotifyAvailableOnCorrectSequence(
|
||||||
|
NetworkHandle network) {
|
||||||
|
}
|
||||||
|
|
||||||
|
} // namespace android
|
||||||
|
} // namespace net
|
76
src/net/android/network_library_stub.cc
Normal file
76
src/net/android/network_library_stub.cc
Normal file
@ -0,0 +1,76 @@
|
|||||||
|
// Copyright (c) 2012 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/android/network_library.h"
|
||||||
|
|
||||||
|
namespace net {
|
||||||
|
namespace android {
|
||||||
|
|
||||||
|
void VerifyX509CertChain(const std::vector<std::string>& cert_chain,
|
||||||
|
base::StringPiece auth_type,
|
||||||
|
base::StringPiece host,
|
||||||
|
CertVerifyStatusAndroid* status,
|
||||||
|
bool* is_issued_by_known_root,
|
||||||
|
std::vector<std::string>* verified_chain) {
|
||||||
|
}
|
||||||
|
|
||||||
|
void AddTestRootCertificate(const uint8_t* cert, size_t len) {
|
||||||
|
}
|
||||||
|
|
||||||
|
void ClearTestRootCertificates() {
|
||||||
|
}
|
||||||
|
|
||||||
|
bool IsCleartextPermitted(const std::string& host) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool HaveOnlyLoopbackAddresses() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool GetMimeTypeFromExtension(const std::string& extension,
|
||||||
|
std::string* result) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string GetTelephonyNetworkOperator() {
|
||||||
|
return {};
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string GetTelephonySimOperator() {
|
||||||
|
return {};
|
||||||
|
}
|
||||||
|
|
||||||
|
bool GetIsRoaming() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool GetIsCaptivePortal() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string GetWifiSSID() {
|
||||||
|
return {};
|
||||||
|
}
|
||||||
|
|
||||||
|
base::Optional<int32_t> GetWifiSignalLevel() {
|
||||||
|
return {};
|
||||||
|
}
|
||||||
|
|
||||||
|
bool GetDnsServers(std::vector<IPEndPoint>* dns_servers,
|
||||||
|
bool* dns_over_tls_active,
|
||||||
|
std::string* dns_over_tls_hostname,
|
||||||
|
std::vector<std::string>* search_suffixes) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ReportBadDefaultNetwork() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
void TagSocket(SocketDescriptor socket, uid_t uid, int32_t tag) {
|
||||||
|
}
|
||||||
|
|
||||||
|
} // namespace android
|
||||||
|
} // namespace net
|
Loading…
Reference in New Issue
Block a user