| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef SYNC_ENGINE_BUILD_COMMIT_COMMAND_H_ | 5 #ifndef SYNC_ENGINE_BUILD_COMMIT_COMMAND_H_ |
| 6 #define SYNC_ENGINE_BUILD_COMMIT_COMMAND_H_ | 6 #define SYNC_ENGINE_BUILD_COMMIT_COMMAND_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "base/gtest_prod_util.h" | 10 #include "base/gtest_prod_util.h" |
| 11 #include "sync/base/sync_export.h" |
| 11 #include "sync/engine/syncer_command.h" | 12 #include "sync/engine/syncer_command.h" |
| 12 #include "sync/syncable/entry_kernel.h" | 13 #include "sync/syncable/entry_kernel.h" |
| 13 | 14 |
| 14 namespace syncer { | 15 namespace syncer { |
| 15 | 16 |
| 16 namespace sessions { | 17 namespace sessions { |
| 17 class OrderedCommitSet; | 18 class OrderedCommitSet; |
| 18 } | 19 } |
| 19 | 20 |
| 20 namespace syncable { | 21 namespace syncable { |
| 21 class Entry; | 22 class Entry; |
| 22 } | 23 } |
| 23 | 24 |
| 24 // A class that contains the code used to serialize a set of sync items into a | 25 // A class that contains the code used to serialize a set of sync items into a |
| 25 // protobuf commit message. This conversion process references the | 26 // protobuf commit message. This conversion process references the |
| 26 // syncable::Directory, which is why it must be called within the same | 27 // syncable::Directory, which is why it must be called within the same |
| 27 // transaction as the GetCommitIdsCommand that fetched the set of items to be | 28 // transaction as the GetCommitIdsCommand that fetched the set of items to be |
| 28 // committed. | 29 // committed. |
| 29 // | 30 // |
| 30 // See SyncerCommand documentation for more info. | 31 // See SyncerCommand documentation for more info. |
| 31 class BuildCommitCommand : public SyncerCommand { | 32 class SYNC_EXPORT_PRIVATE BuildCommitCommand : public SyncerCommand { |
| 32 public: | 33 public: |
| 33 // The batch_commit_set parameter contains a set of references to the items | 34 // The batch_commit_set parameter contains a set of references to the items |
| 34 // that should be committed. | 35 // that should be committed. |
| 35 // | 36 // |
| 36 // The commit_message parameter is an output parameter which will contain the | 37 // The commit_message parameter is an output parameter which will contain the |
| 37 // fully initialized commit message once ExecuteImpl() has been called. | 38 // fully initialized commit message once ExecuteImpl() has been called. |
| 38 BuildCommitCommand(const sessions::OrderedCommitSet& batch_commit_set, | 39 BuildCommitCommand(const sessions::OrderedCommitSet& batch_commit_set, |
| 39 sync_pb::ClientToServerMessage* commit_message); | 40 sync_pb::ClientToServerMessage* commit_message); |
| 40 virtual ~BuildCommitCommand(); | 41 virtual ~BuildCommitCommand(); |
| 41 | 42 |
| (...skipping 26 matching lines...) Expand all Loading... |
| 68 // Input parameter; see constructor comment. | 69 // Input parameter; see constructor comment. |
| 69 const sessions::OrderedCommitSet& batch_commit_set_; | 70 const sessions::OrderedCommitSet& batch_commit_set_; |
| 70 | 71 |
| 71 // Output parameter; see constructor comment. | 72 // Output parameter; see constructor comment. |
| 72 sync_pb::ClientToServerMessage* commit_message_; | 73 sync_pb::ClientToServerMessage* commit_message_; |
| 73 }; | 74 }; |
| 74 | 75 |
| 75 } // namespace syncer | 76 } // namespace syncer |
| 76 | 77 |
| 77 #endif // SYNC_ENGINE_BUILD_COMMIT_COMMAND_H_ | 78 #endif // SYNC_ENGINE_BUILD_COMMIT_COMMAND_H_ |
| OLD | NEW |