#include "services/network/net_log_exporter.h"
#include <utility>
#include "base/command_line.h"
#include "base/files/file_path.h"
#include "base/files/file_util.h"
#include "base/files/scoped_temp_dir.h"
#include "base/functional/bind.h"
#include "base/functional/callback.h"
#include "base/task/task_traits.h"
#include "base/task/thread_pool.h"
#include "base/types/pass_key.h"
#include "base/values.h"
#include "net/log/file_net_log_observer.h"
#include "net/log/net_log_util.h"
#include "net/url_request/url_request_context.h"
#include "services/network/network_context.h"
#include "services/network/network_service.h"
#include "services/network/public/cpp/network_switches.h"
namespace network {
NetLogExporter::NetLogExporter(NetworkContext* network_context)
: … { … }
NetLogExporter::~NetLogExporter() { … }
void NetLogExporter::Start(base::File destination,
base::Value::Dict extra_constants,
net::NetLogCaptureMode capture_mode,
uint64_t max_file_size,
StartCallback callback) { … }
void NetLogExporter::Stop(base::Value::Dict polled_data,
StopCallback callback) { … }
base::FilePath NetLogExporter::CreateScratchDirForNetworkService(
base::PassKey<NetworkService>) { … }
void NetLogExporter::SetCreateScratchDirHandlerForTesting(
const base::RepeatingCallback<base::FilePath()>& handler) { … }
void NetLogExporter::CloseFileOffThread(base::File file) { … }
base::FilePath NetLogExporter::CreateScratchDir(
base::RepeatingCallback<base::FilePath()>
scratch_dir_create_handler_for_tests) { … }
void NetLogExporter::StartWithScratchDirOrCleanup(
base::WeakPtr<NetLogExporter> object,
base::Value::Dict extra_constants,
net::NetLogCaptureMode capture_mode,
uint64_t max_file_size,
StartCallback callback,
const base::FilePath& scratch_dir_path) { … }
void NetLogExporter::StartWithScratchDir(
base::Value::Dict extra_constants,
net::NetLogCaptureMode capture_mode,
uint64_t max_file_size,
StartCallback callback,
const base::FilePath& scratch_dir_path) { … }
}