OLD | NEW |
1 // Copyright (c) 2006-2009 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_PROCESS_COMMIT_RESPONSE_COMMAND_H_ | 5 #ifndef CHROME_BROWSER_SYNC_ENGINE_PROCESS_COMMIT_RESPONSE_COMMAND_H_ |
6 #define CHROME_BROWSER_SYNC_ENGINE_PROCESS_COMMIT_RESPONSE_COMMAND_H_ | 6 #define CHROME_BROWSER_SYNC_ENGINE_PROCESS_COMMIT_RESPONSE_COMMAND_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
11 | 11 |
12 #include "base/basictypes.h" | 12 #include "base/basictypes.h" |
| 13 #include "base/compiler_specific.h" |
13 #include "chrome/browser/sync/engine/model_changing_syncer_command.h" | 14 #include "chrome/browser/sync/engine/model_changing_syncer_command.h" |
14 #include "chrome/browser/sync/engine/syncproto.h" | 15 #include "chrome/browser/sync/engine/syncproto.h" |
15 | 16 |
16 namespace syncable { | 17 namespace syncable { |
17 class Id; | 18 class Id; |
18 class WriteTransaction; | 19 class WriteTransaction; |
19 class MutableEntry; | 20 class MutableEntry; |
20 } | 21 } |
21 | 22 |
22 namespace browser_sync { | 23 namespace browser_sync { |
23 | 24 |
24 class ProcessCommitResponseCommand : public ModelChangingSyncerCommand { | 25 class ProcessCommitResponseCommand : public ModelChangingSyncerCommand { |
25 public: | 26 public: |
26 | 27 |
27 ProcessCommitResponseCommand(); | 28 ProcessCommitResponseCommand(); |
28 virtual ~ProcessCommitResponseCommand(); | 29 virtual ~ProcessCommitResponseCommand(); |
29 | 30 |
30 // ModelChangingSyncerCommand implementation. | 31 // ModelChangingSyncerCommand implementation. |
31 virtual bool ModelNeutralExecuteImpl(sessions::SyncSession* session); | 32 virtual bool ModelNeutralExecuteImpl(sessions::SyncSession* session) OVERRIDE; |
32 virtual void ModelChangingExecuteImpl(sessions::SyncSession* session); | 33 virtual void ModelChangingExecuteImpl( |
| 34 sessions::SyncSession* session) OVERRIDE; |
33 | 35 |
34 private: | 36 private: |
35 CommitResponse::ResponseType ProcessSingleCommitResponse( | 37 CommitResponse::ResponseType ProcessSingleCommitResponse( |
36 syncable::WriteTransaction* trans, | 38 syncable::WriteTransaction* trans, |
37 const sync_pb::CommitResponse_EntryResponse& pb_commit_response, | 39 const sync_pb::CommitResponse_EntryResponse& pb_commit_response, |
38 const sync_pb::SyncEntity& pb_committed_entry, | 40 const sync_pb::SyncEntity& pb_committed_entry, |
39 const syncable::Id& pre_commit_id, | 41 const syncable::Id& pre_commit_id, |
40 std::set<syncable::Id>* conflicting_new_directory_ids, | 42 std::set<syncable::Id>* conflicting_new_directory_ids, |
41 std::set<syncable::Id>* deleted_folders); | 43 std::set<syncable::Id>* deleted_folders); |
42 | 44 |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 const std::string& GetResultingPostCommitName( | 88 const std::string& GetResultingPostCommitName( |
87 const sync_pb::SyncEntity& committed_entry, | 89 const sync_pb::SyncEntity& committed_entry, |
88 const CommitResponse_EntryResponse& entry_response); | 90 const CommitResponse_EntryResponse& entry_response); |
89 | 91 |
90 DISALLOW_COPY_AND_ASSIGN(ProcessCommitResponseCommand); | 92 DISALLOW_COPY_AND_ASSIGN(ProcessCommitResponseCommand); |
91 }; | 93 }; |
92 | 94 |
93 } // namespace browser_sync | 95 } // namespace browser_sync |
94 | 96 |
95 #endif // CHROME_BROWSER_SYNC_ENGINE_PROCESS_COMMIT_RESPONSE_COMMAND_H_ | 97 #endif // CHROME_BROWSER_SYNC_ENGINE_PROCESS_COMMIT_RESPONSE_COMMAND_H_ |
OLD | NEW |