#include "content/browser/network_context_client_base_impl.h"
#include "base/functional/bind.h"
#include "base/task/sequenced_task_runner.h"
#include "base/task/task_runner.h"
#include "base/task/task_traits.h"
#include "base/task/thread_pool.h"
#include "build/build_config.h"
#include "build/chromeos_buildflags.h"
#include "components/file_access/scoped_file_access.h"
#include "content/browser/child_process_security_policy_impl.h"
#include "content/public/browser/content_browser_client.h"
#include "content/public/browser/network_context_client_base.h"
#include "content/public/common/content_client.h"
#include "mojo/public/cpp/bindings/remote.h"
#include "net/base/net_errors.h"
#include "services/network/public/mojom/trust_tokens.mojom.h"
#if BUILDFLAG(IS_ANDROID)
#include "base/android/content_uri_utils.h"
#endif
namespace content {
namespace {
void HandleFileUploadRequest(
int32_t process_id,
bool async,
const std::vector<base::FilePath>& file_paths,
network::mojom::NetworkContextClient::OnFileUploadRequestedCallback
callback,
scoped_refptr<base::TaskRunner> task_runner,
file_access::ScopedFileAccess scoped_file_access) { … }
}
void OnScopedFilesAccessAcquired(
int32_t process_id,
bool async,
const std::vector<base::FilePath>& file_paths,
network::mojom::NetworkContextClient::OnFileUploadRequestedCallback
callback,
file_access::ScopedFileAccess scoped_file_access) { … }
void NetworkContextOnFileUploadRequested(
int32_t process_id,
bool async,
const std::vector<base::FilePath>& file_paths,
const GURL& destination_url,
network::mojom::NetworkContextClient::OnFileUploadRequestedCallback
callback) { … }
NetworkContextClientBase::NetworkContextClientBase() = default;
NetworkContextClientBase::~NetworkContextClientBase() = default;
void NetworkContextClientBase::OnFileUploadRequested(
int32_t process_id,
bool async,
const std::vector<base::FilePath>& file_paths,
const GURL& destination_url,
OnFileUploadRequestedCallback callback) { … }
void NetworkContextClientBase::OnCanSendReportingReports(
const std::vector<url::Origin>& origins,
OnCanSendReportingReportsCallback callback) { … }
void NetworkContextClientBase::OnCanSendDomainReliabilityUpload(
const url::Origin& origin,
OnCanSendDomainReliabilityUploadCallback callback) { … }
#if BUILDFLAG(IS_ANDROID)
void NetworkContextClientBase::OnGenerateHttpNegotiateAuthToken(
const std::string& server_auth_token,
bool can_delegate,
const std::string& auth_negotiate_android_account_type,
const std::string& spn,
OnGenerateHttpNegotiateAuthTokenCallback callback) {
std::move(callback).Run(net::ERR_FAILED, server_auth_token);
}
#endif
#if BUILDFLAG(IS_CHROMEOS)
void NetworkContextClientBase::OnTrustAnchorUsed() {}
#endif
#if BUILDFLAG(IS_CT_SUPPORTED)
void NetworkContextClientBase::OnCanSendSCTAuditingReport(
OnCanSendSCTAuditingReportCallback callback) { … }
void NetworkContextClientBase::OnNewSCTAuditingReportSent() { … }
#endif
}