#include "chrome/browser/sync_file_system/drive_backend/sync_task_token.h"
#include <memory>
#include <utility>
#include "base/functional/bind.h"
#include "base/logging.h"
#include "base/memory/ptr_util.h"
#include "base/task/sequenced_task_runner.h"
#include "base/task/single_thread_task_runner.h"
#include "base/trace_event/trace_event.h"
#include "chrome/browser/sync_file_system/drive_backend/sync_task_manager.h"
#include "chrome/browser/sync_file_system/drive_backend/task_dependency_manager.h"
namespace sync_file_system {
namespace drive_backend {
const int64_t SyncTaskToken::kTestingTaskTokenID = …;
const int64_t SyncTaskToken::kForegroundTaskTokenID = …;
const int64_t SyncTaskToken::kMinimumBackgroundTaskTokenID = …;
std::unique_ptr<SyncTaskToken> SyncTaskToken::CreateForTesting(
SyncStatusCallback callback) { … }
std::unique_ptr<SyncTaskToken> SyncTaskToken::CreateForForegroundTask(
const base::WeakPtr<SyncTaskManager>& manager,
base::SequencedTaskRunner* task_runner) { … }
std::unique_ptr<SyncTaskToken> SyncTaskToken::CreateForBackgroundTask(
const base::WeakPtr<SyncTaskManager>& manager,
base::SequencedTaskRunner* task_runner,
int64_t token_id,
std::unique_ptr<TaskBlocker> task_blocker) { … }
void SyncTaskToken::UpdateTask(const base::Location& location,
SyncStatusCallback callback) { … }
SyncTaskToken::~SyncTaskToken() { … }
SyncStatusCallback SyncTaskToken::WrapToCallback(
std::unique_ptr<SyncTaskToken> token) { … }
void SyncTaskToken::set_task_blocker(
std::unique_ptr<TaskBlocker> task_blocker) { … }
const TaskBlocker* SyncTaskToken::task_blocker() const { … }
void SyncTaskToken::clear_task_blocker() { … }
void SyncTaskToken::InitializeTaskLog(const std::string& task_description) { … }
void SyncTaskToken::FinalizeTaskLog(const std::string& result_description) { … }
void SyncTaskToken::RecordLog(const std::string& message) { … }
void SyncTaskToken::SetTaskLog(std::unique_ptr<TaskLogger::TaskLog> task_log) { … }
std::unique_ptr<TaskLogger::TaskLog> SyncTaskToken::PassTaskLog() { … }
SyncTaskToken::SyncTaskToken(
const base::WeakPtr<SyncTaskManager>& manager,
const scoped_refptr<base::SequencedTaskRunner>& task_runner,
int64_t token_id,
std::unique_ptr<TaskBlocker> task_blocker,
SyncStatusCallback callback)
: … { … }
}
}