Chromium Code Reviews| Index: chrome/browser/sync/profile_sync_service_harness.h |
| diff --git a/chrome/browser/sync/profile_sync_service_harness.h b/chrome/browser/sync/profile_sync_service_harness.h |
| index 42594ba74ea15154f60c2af71aa57d4aa0891abc..87c455e744ef4c6e8a21f648d39a54a33ad74854 100644 |
| --- a/chrome/browser/sync/profile_sync_service_harness.h |
| +++ b/chrome/browser/sync/profile_sync_service_harness.h |
| @@ -18,6 +18,10 @@ |
| class Profile; |
| +namespace invalidation{ |
|
akalin
2013/06/04 19:23:54
space before {
rlarocque
2013/06/04 22:38:16
Done.
|
| +class P2PInvalidationService; |
| +} |
| + |
| namespace browser_sync { |
| namespace sessions { |
| class SyncSessionSnapshot; |
| @@ -33,16 +37,18 @@ class ProfileSyncServiceHarness |
| : public ProfileSyncServiceObserver, |
| public browser_sync::MigrationObserver { |
| public: |
| - ProfileSyncServiceHarness(Profile* profile, |
| - const std::string& username, |
| - const std::string& password); |
| + static ProfileSyncServiceHarness* Create( |
| + Profile* profile, |
| + const std::string& username, |
| + const std::string& password); |
| - virtual ~ProfileSyncServiceHarness(); |
| + static ProfileSyncServiceHarness* CreateForIntegrationTest( |
| + Profile* profile, |
| + const std::string& username, |
| + const std::string& password, |
| + invalidation::P2PInvalidationService* invalidation_service); |
| - // Creates a ProfileSyncServiceHarness object and attaches it to |profile|, a |
| - // profile that is assumed to have been signed into sync in the past. Caller |
| - // takes ownership. |
| - static ProfileSyncServiceHarness* CreateAndAttach(Profile* profile); |
| + virtual ~ProfileSyncServiceHarness(); |
| // Sets the GAIA credentials with which to sign in to sync. |
| void SetCredentials(const std::string& username, const std::string& password); |
| @@ -62,6 +68,7 @@ class ProfileSyncServiceHarness |
| // ProfileSyncServiceObserver implementation. |
| virtual void OnStateChanged() OVERRIDE; |
| + virtual void OnSyncCycleCompleted() OVERRIDE; |
| // MigrationObserver implementation. |
| virtual void OnMigrationStateChange() OVERRIDE; |
| @@ -270,6 +277,12 @@ class ProfileSyncServiceHarness |
| NUMBER_OF_STATES, |
| }; |
| + ProfileSyncServiceHarness( |
| + Profile* profile, |
| + const std::string& username, |
| + const std::string& password, |
| + invalidation::P2PInvalidationService* invalidation_service); |
| + |
| // Listen to migration events if the migrator has been initialized |
| // and we're not already listening. Returns true if we started |
| // listening. |
| @@ -334,6 +347,9 @@ class ProfileSyncServiceHarness |
| // ProfileSyncService object associated with |profile_|. |
| ProfileSyncService* service_; |
| + // P2PInvalidationService associated with |profile_|. |
| + invalidation::P2PInvalidationService* p2p_invalidation_service_; |
| + |
| // The harness of the client whose update progress marker we're expecting |
| // eventually match. |
| ProfileSyncServiceHarness* progress_marker_partner_; |