#include "components/sync/engine/commit.h"
#include <utility>
#include "base/logging.h"
#include "base/metrics/histogram_macros.h"
#include "base/notreached.h"
#include "base/rand_util.h"
#include "base/trace_event/trace_event.h"
#include "components/sync/engine/active_devices_invalidation_info.h"
#include "components/sync/engine/commit_processor.h"
#include "components/sync/engine/commit_util.h"
#include "components/sync/engine/cycle/sync_cycle.h"
#include "components/sync/engine/events/commit_request_event.h"
#include "components/sync/engine/events/commit_response_event.h"
#include "components/sync/engine/syncer.h"
#include "components/sync/engine/syncer_proto_util.h"
#include "net/http/http_status_code.h"
namespace syncer {
namespace {
const size_t kPaddingSize = …;
std::string RandASCIIString(size_t length) { … }
SyncCommitError GetSyncCommitError(SyncerError syncer_error) { … }
}
Commit::Commit(ContributionMap contributions,
const sync_pb::ClientToServerMessage& message,
ExtensionsActivity::Records extensions_activity_buffer)
: … { … }
Commit::~Commit() = default;
std::unique_ptr<Commit> Commit::Init(
DataTypeSet enabled_types,
size_t max_entries,
const std::string& account_name,
const std::string& cache_guid,
bool cookie_jar_mismatch,
const ActiveDevicesInvalidationInfo& active_devices_invalidation_info,
CommitProcessor* commit_processor,
ExtensionsActivity* extensions_activity) { … }
SyncerError Commit::PostAndProcessResponse(
NudgeTracker* nudge_tracker,
SyncCycle* cycle,
StatusController* status,
ExtensionsActivity* extensions_activity) { … }
DataTypeSet Commit::GetContributingDataTypes() const { … }
void Commit::ReportFullCommitFailure(SyncerError syncer_error) { … }
}