| OLD | NEW |
| 1 // Copyright (c) 2012 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 SYNC_ENGINE_COMMIT_H_ | 5 #ifndef SYNC_ENGINE_COMMIT_H_ |
| 6 #define SYNC_ENGINE_COMMIT_H_ | 6 #define SYNC_ENGINE_COMMIT_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include <map> | 10 #include <map> |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 // This destructor will DCHECK if CleanUp() has not been called. | 51 // This destructor will DCHECK if CleanUp() has not been called. |
| 52 ~Commit(); | 52 ~Commit(); |
| 53 | 53 |
| 54 static Commit* Init( | 54 static Commit* Init( |
| 55 ModelTypeSet requested_types, | 55 ModelTypeSet requested_types, |
| 56 ModelTypeSet enabled_types, | 56 ModelTypeSet enabled_types, |
| 57 size_t max_entries, | 57 size_t max_entries, |
| 58 const std::string& account_name, | 58 const std::string& account_name, |
| 59 const std::string& cache_guid, | 59 const std::string& cache_guid, |
| 60 bool cookie_jar_mismatch, | 60 bool cookie_jar_mismatch, |
| 61 bool cookie_jar_empty, |
| 61 CommitProcessor* commit_processor, | 62 CommitProcessor* commit_processor, |
| 62 ExtensionsActivity* extensions_activity); | 63 ExtensionsActivity* extensions_activity); |
| 63 | 64 |
| 64 SyncerError PostAndProcessResponse(sessions::NudgeTracker* nudge_tracker, | 65 SyncerError PostAndProcessResponse(sessions::NudgeTracker* nudge_tracker, |
| 65 sessions::SyncSession* session, | 66 sessions::SyncSession* session, |
| 66 sessions::StatusController* status, | 67 sessions::StatusController* status, |
| 67 ExtensionsActivity* extensions_activity); | 68 ExtensionsActivity* extensions_activity); |
| 68 | 69 |
| 69 // Cleans up state associated with this commit. Must be called before the | 70 // Cleans up state associated with this commit. Must be called before the |
| 70 // destructor. | 71 // destructor. |
| 71 void CleanUp(); | 72 void CleanUp(); |
| 72 | 73 |
| 73 private: | 74 private: |
| 74 ContributionMap contributions_; | 75 ContributionMap contributions_; |
| 75 | 76 |
| 76 sync_pb::ClientToServerMessage message_; | 77 sync_pb::ClientToServerMessage message_; |
| 77 sync_pb::ClientToServerResponse response_; | 78 sync_pb::ClientToServerResponse response_; |
| 78 ExtensionsActivity::Records extensions_activity_buffer_; | 79 ExtensionsActivity::Records extensions_activity_buffer_; |
| 79 | 80 |
| 80 // Debug only flag used to indicate if it's safe to destruct the object. | 81 // Debug only flag used to indicate if it's safe to destruct the object. |
| 81 bool cleaned_up_; | 82 bool cleaned_up_; |
| 82 | 83 |
| 83 DISALLOW_COPY_AND_ASSIGN(Commit); | 84 DISALLOW_COPY_AND_ASSIGN(Commit); |
| 84 }; | 85 }; |
| 85 | 86 |
| 86 } // namespace syncer | 87 } // namespace syncer |
| 87 | 88 |
| 88 #endif // SYNC_ENGINE_COMMIT_H_ | 89 #endif // SYNC_ENGINE_COMMIT_H_ |
| OLD | NEW |