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

Side by Side Diff: chrome/browser/sync/engine/get_commit_ids_command.h

Issue 9113024: Add return values to SyncerCommand (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Move syncer_error.* to internal_api/includes Created 8 years, 11 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 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>
11 11
12 #include "base/compiler_specific.h" 12 #include "base/compiler_specific.h"
13 #include "chrome/browser/sync/engine/syncer_command.h" 13 #include "chrome/browser/sync/engine/syncer_command.h"
14 #include "chrome/browser/sync/engine/syncer_util.h" 14 #include "chrome/browser/sync/engine/syncer_util.h"
15 #include "chrome/browser/sync/sessions/ordered_commit_set.h" 15 #include "chrome/browser/sync/sessions/ordered_commit_set.h"
16 #include "chrome/browser/sync/sessions/sync_session.h" 16 #include "chrome/browser/sync/sessions/sync_session.h"
17 17
18 using std::pair; 18 using std::pair;
19 using std::vector; 19 using std::vector;
20 20
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
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_
OLDNEW
« no previous file with comments | « chrome/browser/sync/engine/download_updates_command.cc ('k') | chrome/browser/sync/engine/get_commit_ids_command.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698