#include "components/tracing/common/background_tracing_state_manager.h"
#include <cstddef>
#include <cstdint>
#include <memory>
#include "base/json/values_util.h"
#include "base/memory/ptr_util.h"
#include "base/task/single_thread_task_runner.h"
#include "base/values.h"
#include "components/tracing/common/pref_names.h"
namespace tracing {
namespace {
constexpr char kTracingStateKey[] = …;
constexpr char kTracingEnabledScenariosKey[] = …;
constexpr char kTracingPrivacyFilterKey[] = …;
BackgroundTracingStateManager* g_background_tracing_state_manager = …;
}
BackgroundTracingStateManager::BackgroundTracingStateManager(
PrefService* local_state)
: … { … }
BackgroundTracingStateManager::~BackgroundTracingStateManager() { … }
std::unique_ptr<BackgroundTracingStateManager>
BackgroundTracingStateManager::CreateInstance(PrefService* local_state) { … }
BackgroundTracingStateManager& BackgroundTracingStateManager::GetInstance() { … }
void BackgroundTracingStateManager::Initialize() { … }
void BackgroundTracingStateManager::SaveState() { … }
bool BackgroundTracingStateManager::DidLastSessionEndUnexpectedly() const { … }
void BackgroundTracingStateManager::OnTracingStarted() { … }
void BackgroundTracingStateManager::OnTracingStopped() { … }
void BackgroundTracingStateManager::UpdateEnabledScenarios(
std::vector<std::string> enabled_scenarios) { … }
void BackgroundTracingStateManager::UpdatePrivacyFilter(bool enabled) { … }
void BackgroundTracingStateManager::SetState(BackgroundTracingState new_state) { … }
void BackgroundTracingStateManager::ResetForTesting() { … }
}