| 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_PROFILE_SYNC_SERVICE_HARNESS_H_ | 5 #ifndef CHROME_BROWSER_SYNC_PROFILE_SYNC_SERVICE_HARNESS_H_ |
| 6 #define CHROME_BROWSER_SYNC_PROFILE_SYNC_SERVICE_HARNESS_H_ | 6 #define CHROME_BROWSER_SYNC_PROFILE_SYNC_SERVICE_HARNESS_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 165 WAITING_FOR_PASSPHRASE_ACCEPTED, | 165 WAITING_FOR_PASSPHRASE_ACCEPTED, |
| 166 | 166 |
| 167 // The sync client anticipates encryption of new datatypes. | 167 // The sync client anticipates encryption of new datatypes. |
| 168 WAITING_FOR_ENCRYPTION, | 168 WAITING_FOR_ENCRYPTION, |
| 169 | 169 |
| 170 // The sync client is waiting for the datatype manager to be configured and | 170 // The sync client is waiting for the datatype manager to be configured and |
| 171 // for sync to be fully initialized. Used after a browser restart, where a | 171 // for sync to be fully initialized. Used after a browser restart, where a |
| 172 // full sync cycle is not expected to occur. | 172 // full sync cycle is not expected to occur. |
| 173 WAITING_FOR_SYNC_CONFIGURATION, | 173 WAITING_FOR_SYNC_CONFIGURATION, |
| 174 | 174 |
| 175 // The sync client needs a passphrase in order to decrypt data. |
| 176 PASSPHRASE_REQUIRED_FOR_DECRYPTION, |
| 177 |
| 175 // The sync client cannot reach the server. | 178 // The sync client cannot reach the server. |
| 176 SERVER_UNREACHABLE, | 179 SERVER_UNREACHABLE, |
| 177 | 180 |
| 178 // The sync client is fully synced and there are no pending updates. | 181 // The sync client is fully synced and there are no pending updates. |
| 179 FULLY_SYNCED, | 182 FULLY_SYNCED, |
| 180 | 183 |
| 181 // Syncing is disabled for the client. | 184 // Syncing is disabled for the client. |
| 182 SYNC_DISABLED, | 185 SYNC_DISABLED, |
| 183 | 186 |
| 184 NUMBER_OF_STATES, | 187 NUMBER_OF_STATES, |
| (...skipping 27 matching lines...) Expand all Loading... |
| 212 // for a particular datatype. | 215 // for a particular datatype. |
| 213 std::string GetUpdatedTimestamp(syncable::ModelType model_type); | 216 std::string GetUpdatedTimestamp(syncable::ModelType model_type); |
| 214 | 217 |
| 215 // Gets the status from |service_| in pretty printable form. | 218 // Gets the status from |service_| in pretty printable form. |
| 216 std::string GetServiceStatus(); | 219 std::string GetServiceStatus(); |
| 217 | 220 |
| 218 // When in WAITING_FOR_ENCRYPTION state, we check to see if this type is now | 221 // When in WAITING_FOR_ENCRYPTION state, we check to see if this type is now |
| 219 // encrypted to determine if we're done. | 222 // encrypted to determine if we're done. |
| 220 syncable::ModelType waiting_for_encryption_type_; | 223 syncable::ModelType waiting_for_encryption_type_; |
| 221 | 224 |
| 225 // The WaitState in which the sync client currently is. Helps determine what |
| 226 // action to take when RunStateChangeMachine() is called. |
| 222 WaitState wait_state_; | 227 WaitState wait_state_; |
| 223 | 228 |
| 229 // Sync profile associated with this sync client. |
| 224 Profile* profile_; | 230 Profile* profile_; |
| 231 |
| 232 // ProfileSyncService object associated with |profile_|. |
| 225 ProfileSyncService* service_; | 233 ProfileSyncService* service_; |
| 226 | 234 |
| 227 // The harness of the client whose update progress marker we're expecting | 235 // The harness of the client whose update progress marker we're expecting |
| 228 // eventually match. | 236 // eventually match. |
| 229 ProfileSyncServiceHarness* timestamp_match_partner_; | 237 ProfileSyncServiceHarness* timestamp_match_partner_; |
| 230 | 238 |
| 231 // Credentials used for GAIA authentication. | 239 // Credentials used for GAIA authentication. |
| 232 std::string username_; | 240 std::string username_; |
| 233 std::string password_; | 241 std::string password_; |
| 234 | 242 |
| 235 // Client ID, used for logging purposes. | 243 // Client ID, used for logging purposes. |
| 236 int id_; | 244 int id_; |
| 237 | 245 |
| 238 DISALLOW_COPY_AND_ASSIGN(ProfileSyncServiceHarness); | 246 DISALLOW_COPY_AND_ASSIGN(ProfileSyncServiceHarness); |
| 239 }; | 247 }; |
| 240 | 248 |
| 241 #endif // CHROME_BROWSER_SYNC_PROFILE_SYNC_SERVICE_HARNESS_H_ | 249 #endif // CHROME_BROWSER_SYNC_PROFILE_SYNC_SERVICE_HARNESS_H_ |
| OLD | NEW |