| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 CHROME_BROWSER_SYNC_ENGINE_GET_COMMIT_IDS_COMMAND_H_ | 5 #ifndef CHROME_BROWSER_SYNC_ENGINE_GET_COMMIT_IDS_COMMAND_H_ |
| 6 #define CHROME_BROWSER_SYNC_ENGINE_GET_COMMIT_IDS_COMMAND_H_ | 6 #define CHROME_BROWSER_SYNC_ENGINE_GET_COMMIT_IDS_COMMAND_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <utility> | 9 #include <utility> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 namespace browser_sync { | 21 namespace browser_sync { |
| 22 | 22 |
| 23 class GetCommitIdsCommand : public SyncerCommand { | 23 class GetCommitIdsCommand : public SyncerCommand { |
| 24 friend class SyncerTest; | 24 friend class SyncerTest; |
| 25 | 25 |
| 26 public: | 26 public: |
| 27 explicit GetCommitIdsCommand(int commit_batch_size); | 27 explicit GetCommitIdsCommand(int commit_batch_size); |
| 28 virtual ~GetCommitIdsCommand(); | 28 virtual ~GetCommitIdsCommand(); |
| 29 | 29 |
| 30 // SyncerCommand implementation. | 30 // SyncerCommand implementation. |
| 31 virtual void ExecuteImpl(sessions::SyncSession* session) OVERRIDE; | 31 virtual SyncerError ExecuteImpl(sessions::SyncSession* session) OVERRIDE; |
| 32 | 32 |
| 33 // Builds a vector of IDs that should be committed. | 33 // Builds a vector of IDs that should be committed. |
| 34 void BuildCommitIds(const vector<int64>& unsynced_handles, | 34 void BuildCommitIds(const vector<int64>& unsynced_handles, |
| 35 syncable::WriteTransaction* write_transaction, | 35 syncable::WriteTransaction* write_transaction, |
| 36 const ModelSafeRoutingInfo& routes, | 36 const ModelSafeRoutingInfo& routes, |
| 37 syncable::ModelTypeSet throttled_types); | 37 syncable::ModelTypeSet throttled_types); |
| 38 | 38 |
| 39 // TODO(chron): Remove writes from this iterator. As a warning, this | 39 // TODO(chron): Remove writes from this iterator. As a warning, this |
| 40 // iterator causes writes to entries and so isn't a pure iterator. | 40 // iterator causes writes to entries and so isn't a pure iterator. |
| 41 // It will do Put(IS_UNSYNCED). Refactor this out later. | 41 // It will do Put(IS_UNSYNCED). Refactor this out later. |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 158 int requested_commit_batch_size_; | 158 int requested_commit_batch_size_; |
| 159 bool passphrase_missing_; | 159 bool passphrase_missing_; |
| 160 syncable::ModelTypeSet encrypted_types_; | 160 syncable::ModelTypeSet encrypted_types_; |
| 161 | 161 |
| 162 DISALLOW_COPY_AND_ASSIGN(GetCommitIdsCommand); | 162 DISALLOW_COPY_AND_ASSIGN(GetCommitIdsCommand); |
| 163 }; | 163 }; |
| 164 | 164 |
| 165 } // namespace browser_sync | 165 } // namespace browser_sync |
| 166 | 166 |
| 167 #endif // CHROME_BROWSER_SYNC_ENGINE_GET_COMMIT_IDS_COMMAND_H_ | 167 #endif // CHROME_BROWSER_SYNC_ENGINE_GET_COMMIT_IDS_COMMAND_H_ |
| OLD | NEW |