chromium/chrome/browser/enterprise/remote_commands/clear_browsing_data_job.cc

// Copyright 2020 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "chrome/browser/enterprise/remote_commands/clear_browsing_data_job.h"

#include <optional>

#include "base/functional/bind.h"
#include "base/json/json_reader.h"
#include "base/json/json_writer.h"
#include "base/task/single_thread_task_runner.h"
#include "base/values.h"
#include "chrome/browser/profiles/profile.h"

namespace enterprise_commands {

namespace {

const char kFailedTypesPath[] =;

const char kClearCacheField[] =;
const char kClearCookiesField[] =;

// Define the possibly failed data types here for 2 reasons:
//
// 1. This will be easier to keep in sync with the server, as the latter
// doesn't care about *all* the types in BrowsingDataRemover.
//
// 2. Centralize handling the underlying type of the values here.
// BrowsingDataRemover represents failed types as uint64_t, which isn't
// natively supported by base::Value, so this class needs to convert to a
// type that's supported. This will also allow us to use a list instead of a
// bit mask, which will be easier to parse gracefully on the server in case
// more types are added.
enum class DataTypes {};

std::string CreatePayload(uint64_t failed_data_types) {}

}  // namespace

ClearBrowsingDataJob::ClearBrowsingDataJob(ProfileManager* profile_manager)
    :{}
ClearBrowsingDataJob::ClearBrowsingDataJob(Profile* profile)
    :{}

ClearBrowsingDataJob::~ClearBrowsingDataJob() = default;

enterprise_management::RemoteCommand_Type ClearBrowsingDataJob::GetType()
    const {}

bool ClearBrowsingDataJob::ParseCommandPayload(
    const std::string& command_payload) {}

void ClearBrowsingDataJob::RunImpl(CallbackWithResult result_callback) {}

void ClearBrowsingDataJob::OnBrowsingDataRemoverDone(
    uint64_t failed_data_types) {}

}  // namespace enterprise_commands