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_SYNCER_H_ | 5 #ifndef CHROME_BROWSER_SYNC_ENGINE_SYNCER_H_ |
6 #define CHROME_BROWSER_SYNC_ENGINE_SYNCER_H_ | 6 #define CHROME_BROWSER_SYNC_ENGINE_SYNCER_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <utility> | 9 #include <utility> |
10 #include <vector> | 10 #include <vector> |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
80 // Called by other threads to tell the syncer to stop what it's doing | 80 // Called by other threads to tell the syncer to stop what it's doing |
81 // and return early from SyncShare, if possible. | 81 // and return early from SyncShare, if possible. |
82 bool ExitRequested(); | 82 bool ExitRequested(); |
83 void RequestEarlyExit(); | 83 void RequestEarlyExit(); |
84 | 84 |
85 // Runs a sync cycle from |first_step| to |last_step|. | 85 // Runs a sync cycle from |first_step| to |last_step|. |
86 virtual void SyncShare(sessions::SyncSession* session, | 86 virtual void SyncShare(sessions::SyncSession* session, |
87 SyncerStep first_step, | 87 SyncerStep first_step, |
88 SyncerStep last_step); | 88 SyncerStep last_step); |
89 | 89 |
90 class ScopedSyncStartStopTracker { | |
91 public: | |
92 explicit ScopedSyncStartStopTracker(sessions::SyncSession* session); | |
93 ~ScopedSyncStartStopTracker(); | |
94 private: | |
95 sessions::SyncSession* session_; | |
tim (not reviewing)
2011/08/10 00:08:29
disallow copy/assign
| |
96 }; | |
97 | |
90 private: | 98 private: |
91 // Implements the PROCESS_CLIENT_COMMAND syncer step. | 99 // Implements the PROCESS_CLIENT_COMMAND syncer step. |
92 void ProcessClientCommand(sessions::SyncSession* session); | 100 void ProcessClientCommand(sessions::SyncSession* session); |
93 | 101 |
94 bool early_exit_requested_; | 102 bool early_exit_requested_; |
95 base::Lock early_exit_requested_lock_; | 103 base::Lock early_exit_requested_lock_; |
96 | 104 |
97 ConflictResolver resolver_; | 105 ConflictResolver resolver_; |
98 | 106 |
99 // A callback hook used in unittests to simulate changes between conflict set | 107 // A callback hook used in unittests to simulate changes between conflict set |
(...skipping 28 matching lines...) Expand all Loading... | |
128 }; | 136 }; |
129 | 137 |
130 // Utility function declarations. | 138 // Utility function declarations. |
131 void CopyServerFields(syncable::Entry* src, syncable::MutableEntry* dest); | 139 void CopyServerFields(syncable::Entry* src, syncable::MutableEntry* dest); |
132 void ClearServerData(syncable::MutableEntry* entry); | 140 void ClearServerData(syncable::MutableEntry* entry); |
133 | 141 |
134 } // namespace browser_sync | 142 } // namespace browser_sync |
135 | 143 |
136 #endif // CHROME_BROWSER_SYNC_ENGINE_SYNCER_H_ | 144 #endif // CHROME_BROWSER_SYNC_ENGINE_SYNCER_H_ |
137 | 145 |
OLD | NEW |