Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(526)

Unified Diff: sync/engine/process_updates_command.h

Issue 38803003: sync: Implement per-type update processing (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix integration tests Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: sync/engine/process_updates_command.h
diff --git a/sync/engine/process_updates_command.h b/sync/engine/process_updates_command.h
deleted file mode 100644
index 4d7d287c488b1d388b4d0c8ea64fd5f2d372decb..0000000000000000000000000000000000000000
--- a/sync/engine/process_updates_command.h
+++ /dev/null
@@ -1,67 +0,0 @@
-// Copyright 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef SYNC_ENGINE_PROCESS_UPDATES_COMMAND_H_
-#define SYNC_ENGINE_PROCESS_UPDATES_COMMAND_H_
-
-#include "base/compiler_specific.h"
-#include "sync/base/sync_export.h"
-#include "sync/engine/model_changing_syncer_command.h"
-#include "sync/engine/syncer_types.h"
-
-namespace sync_pb {
-class GetUpdatesResponse;
-class SyncEntity;
-}
-
-namespace syncer {
-
-namespace syncable {
-class ModelNeutralWriteTransaction;
-}
-
-class Cryptographer;
-
-// A syncer command for verifying and processing updates.
-//
-// Preconditions - Updates in the SyncerSesssion have been downloaded.
-//
-// Postconditions - All of the verified SyncEntity data will be copied to
-// the server fields of the corresponding syncable entries.
-class SYNC_EXPORT_PRIVATE ProcessUpdatesCommand : public SyncerCommand {
- public:
- ProcessUpdatesCommand();
- virtual ~ProcessUpdatesCommand();
-
- protected:
- // SyncerCommand implementation.
- virtual SyncerError ExecuteImpl(sessions::SyncSession* session) OVERRIDE;
-
- private:
- typedef std::vector<const sync_pb::SyncEntity*> SyncEntityList;
- typedef std::map<ModelType, SyncEntityList> TypeSyncEntityMap;
-
- // Given a GetUpdates response, iterates over all the returned items and
- // divides them according to their type. Outputs a map from model types to
- // received SyncEntities. ModelTypes that had no items in the update response
- // will not be included in this map.
- static void PartitionUpdatesByType(
- const sync_pb::GetUpdatesResponse& updates,
- TypeSyncEntityMap* updates_by_type);
-
- VerifyResult VerifyUpdate(
- syncable::ModelNeutralWriteTransaction* trans,
- const sync_pb::SyncEntity& entry,
- ModelTypeSet requested_types,
- const ModelSafeRoutingInfo& routes);
- void ProcessUpdate(
- const sync_pb::SyncEntity& proto_update,
- const Cryptographer* cryptographer,
- syncable::ModelNeutralWriteTransaction* const trans);
- DISALLOW_COPY_AND_ASSIGN(ProcessUpdatesCommand);
-};
-
-} // namespace syncer
-
-#endif // SYNC_ENGINE_PROCESS_UPDATES_COMMAND_H_

Powered by Google App Engine
This is Rietveld 408576698