Chromium Code Reviews| 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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 73 | 73 |
| 74 // Blocks the caller until the datatype manager is configured and sync has | 74 // Blocks the caller until the datatype manager is configured and sync has |
| 75 // been initialized (for example, after a browser restart). Returns true if | 75 // been initialized (for example, after a browser restart). Returns true if |
| 76 // the wait was successful. | 76 // the wait was successful. |
| 77 bool AwaitSyncRestart(); | 77 bool AwaitSyncRestart(); |
| 78 | 78 |
| 79 // Blocks the caller until this harness has completed a single sync cycle | 79 // Blocks the caller until this harness has completed a single sync cycle |
| 80 // since the previous one. Returns true if a sync cycle has completed. | 80 // since the previous one. Returns true if a sync cycle has completed. |
| 81 bool AwaitSyncCycleCompletion(const std::string& reason); | 81 bool AwaitSyncCycleCompletion(const std::string& reason); |
| 82 | 82 |
| 83 // Blocks the caller until the sync has been disabled for this client. Returns | 83 // Blocks the caller until the sync has been disabled for this client. Returns |
|
Raghu Simha
2011/09/16 04:01:02
While you're at it: s/the sync/sync/
lipalani1
2011/09/19 18:59:13
Done.
| |
| 84 // true if sync is disabled. | 84 // true if sync is disabled. |
| 85 bool AwaitSyncDisabled(const std::string& reason); | 85 bool AwaitSyncDisabled(const std::string& reason); |
| 86 | 86 |
| 87 // Blocks the caller until exponential backoff has been verified to happen. | 87 // Blocks the caller until exponential backoff has been verified to happen. |
| 88 bool AwaitExponentialBackoffVerification(); | 88 bool AwaitExponentialBackoffVerification(); |
| 89 | 89 |
| 90 // Blocks the caller until the syncer receives a actionable error. | |
|
Raghu Simha
2011/09/16 04:01:02
nit: s/a actionable/an actionable/
Raghu Simha
2011/09/16 04:01:02
Add "Returns true when so-and-so happens" to this
lipalani1
2011/09/19 18:59:13
Done.
lipalani1
2011/09/19 18:59:13
Done.
| |
| 91 bool AwaitActionableError(); | |
| 92 | |
| 90 // Blocks until the given set of data types are migrated. | 93 // Blocks until the given set of data types are migrated. |
| 91 bool AwaitMigration(const syncable::ModelTypeSet& expected_migrated_types); | 94 bool AwaitMigration(const syncable::ModelTypeSet& expected_migrated_types); |
| 92 | 95 |
| 93 // Blocks the caller until this harness has observed that the sync engine | 96 // Blocks the caller until this harness has observed that the sync engine |
| 94 // has downloaded all the changes seen by the |partner| harness's client. | 97 // has downloaded all the changes seen by the |partner| harness's client. |
| 95 bool WaitUntilTimestampMatches( | 98 bool WaitUntilTimestampMatches( |
| 96 ProfileSyncServiceHarness* partner, const std::string& reason); | 99 ProfileSyncServiceHarness* partner, const std::string& reason); |
| 97 | 100 |
| 98 // Calling this acts as a barrier and blocks the caller until |this| and | 101 // Calling this acts as a barrier and blocks the caller until |this| and |
| 99 // |partner| have both completed a sync cycle. When calling this method, | 102 // |partner| have both completed a sync cycle. When calling this method, |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 213 // The sync client is in the exponential backoff mode. Verify that | 216 // The sync client is in the exponential backoff mode. Verify that |
| 214 // backoffs are triggered correctly. | 217 // backoffs are triggered correctly. |
| 215 WAITING_FOR_EXPONENTIAL_BACKOFF_VERIFICATION, | 218 WAITING_FOR_EXPONENTIAL_BACKOFF_VERIFICATION, |
| 216 | 219 |
| 217 // The sync client is waiting for migration to start. | 220 // The sync client is waiting for migration to start. |
| 218 WAITING_FOR_MIGRATION_TO_START, | 221 WAITING_FOR_MIGRATION_TO_START, |
| 219 | 222 |
| 220 // The sync client is waiting for migration to finish. | 223 // The sync client is waiting for migration to finish. |
| 221 WAITING_FOR_MIGRATION_TO_FINISH, | 224 WAITING_FOR_MIGRATION_TO_FINISH, |
| 222 | 225 |
| 226 // The sync client is waiting for an actionable error from server. | |
|
Raghu Simha
2011/09/16 04:01:02
nit: s/from server/from the server/
lipalani1
2011/09/19 18:59:13
Done.
| |
| 227 WAITING_FOR_ACTIONABLE_ERROR, | |
| 228 | |
| 223 // The client verification is complete. We don't care about the state of | 229 // The client verification is complete. We don't care about the state of |
| 224 // the syncer any more. | 230 // the syncer any more. |
| 225 WAITING_FOR_NOTHING, | 231 WAITING_FOR_NOTHING, |
| 226 | 232 |
| 227 // The sync client needs a passphrase in order to decrypt data. | 233 // The sync client needs a passphrase in order to decrypt data. |
| 228 SET_PASSPHRASE_FAILED, | 234 SET_PASSPHRASE_FAILED, |
| 229 | 235 |
| 230 // The sync client cannot reach the server. | 236 // The sync client cannot reach the server. |
| 231 SERVER_UNREACHABLE, | 237 SERVER_UNREACHABLE, |
| 232 | 238 |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 313 const std::string profile_debug_name_; | 319 const std::string profile_debug_name_; |
| 314 | 320 |
| 315 // Keeps track of the number of attempts at exponential backoff and its | 321 // Keeps track of the number of attempts at exponential backoff and its |
| 316 // related bookkeeping information for verification. | 322 // related bookkeeping information for verification. |
| 317 browser_sync::RetryVerifier retry_verifier_; | 323 browser_sync::RetryVerifier retry_verifier_; |
| 318 | 324 |
| 319 DISALLOW_COPY_AND_ASSIGN(ProfileSyncServiceHarness); | 325 DISALLOW_COPY_AND_ASSIGN(ProfileSyncServiceHarness); |
| 320 }; | 326 }; |
| 321 | 327 |
| 322 #endif // CHROME_BROWSER_SYNC_PROFILE_SYNC_SERVICE_HARNESS_H_ | 328 #endif // CHROME_BROWSER_SYNC_PROFILE_SYNC_SERVICE_HARNESS_H_ |
| OLD | NEW |