OLD | NEW |
1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2009 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 | 11 |
11 #include "base/basictypes.h" | 12 #include "base/basictypes.h" |
12 #include "chrome/browser/sync/engine/model_changing_syncer_command.h" | 13 #include "chrome/browser/sync/engine/model_changing_syncer_command.h" |
13 #include "chrome/browser/sync/engine/syncproto.h" | 14 #include "chrome/browser/sync/engine/syncproto.h" |
14 | 15 |
15 namespace syncable { | 16 namespace syncable { |
16 class Id; | 17 class Id; |
17 class WriteTransaction; | 18 class WriteTransaction; |
18 class MutableEntry; | 19 class MutableEntry; |
19 } | 20 } |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 // stores the fields back in the client-visible (i.e. not the SERVER_* fields) | 76 // stores the fields back in the client-visible (i.e. not the SERVER_* fields) |
76 // fields of the entry. This should only be done if the item did not change | 77 // fields of the entry. This should only be done if the item did not change |
77 // locally while the commit was in flight. | 78 // locally while the commit was in flight. |
78 // Helper for ProcessSuccessfulCommitResponse. | 79 // Helper for ProcessSuccessfulCommitResponse. |
79 void OverrideClientFieldsAfterCommit( | 80 void OverrideClientFieldsAfterCommit( |
80 const sync_pb::SyncEntity& committed_entry, | 81 const sync_pb::SyncEntity& committed_entry, |
81 const CommitResponse_EntryResponse& entry_response, | 82 const CommitResponse_EntryResponse& entry_response, |
82 syncable::MutableEntry* local_entry); | 83 syncable::MutableEntry* local_entry); |
83 | 84 |
84 // Helper to extract the final name from the protobufs. | 85 // Helper to extract the final name from the protobufs. |
85 const string& GetResultingPostCommitName( | 86 const std::string& GetResultingPostCommitName( |
86 const sync_pb::SyncEntity& committed_entry, | 87 const sync_pb::SyncEntity& committed_entry, |
87 const CommitResponse_EntryResponse& entry_response); | 88 const CommitResponse_EntryResponse& entry_response); |
88 | 89 |
89 DISALLOW_COPY_AND_ASSIGN(ProcessCommitResponseCommand); | 90 DISALLOW_COPY_AND_ASSIGN(ProcessCommitResponseCommand); |
90 }; | 91 }; |
91 | 92 |
92 } // namespace browser_sync | 93 } // namespace browser_sync |
93 | 94 |
94 #endif // CHROME_BROWSER_SYNC_ENGINE_PROCESS_COMMIT_RESPONSE_COMMAND_H_ | 95 #endif // CHROME_BROWSER_SYNC_ENGINE_PROCESS_COMMIT_RESPONSE_COMMAND_H_ |
OLD | NEW |