Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(659)

Unified Diff: chrome/browser/sync/profile_sync_service_harness.h

Issue 15580002: Make use of InvalidationService (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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..a43e8a6705a4753a4e6b678be17f6bae738f3325 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 {
+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_;
« no previous file with comments | « chrome/browser/sync/profile_sync_service_factory.cc ('k') | chrome/browser/sync/profile_sync_service_harness.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698