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

Unified Diff: chrome/browser/sync/test/integration/p2p_sync_refresher.h

Issue 772513004: Add new E2E sync multi profiles tests. This should not affect any existing (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: implement OnSyncCycleCompleted send refresh notifications Created 6 years 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/test/integration/p2p_sync_refresher.h
diff --git a/chrome/browser/sync/test/integration/p2p_sync_refresher.h b/chrome/browser/sync/test/integration/p2p_sync_refresher.h
new file mode 100644
index 0000000000000000000000000000000000000000..513d11cbf01c85620dea3f3c266c04caa1d63edf
--- /dev/null
+++ b/chrome/browser/sync/test/integration/p2p_sync_refresher.h
@@ -0,0 +1,33 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_SYNC_TEST_INTEGRATION_P2P_SYNC_REFRESHER_H_
+#define CHROME_BROWSER_SYNC_TEST_INTEGRATION_P2P_SYNC_REFRESHER_H_
+
+#include "base/basictypes.h"
+#include "chrome/browser/sync/profile_sync_service_observer.h"
+
+class ProfileSyncService;
+
+// This class observe ProfileSyncService events and emit refresh notifications
Nicolas Zea 2014/12/18 20:55:25 grammar nit: observes and emits
shadi 2014/12/19 19:15:12 Done.
+// to other test profiles for any committed changes it observes.
+//
+// It register and unregisters in its constructor and destructor. This is
+// intended to make it easy to manage with a scoped_ptr.
+class P2PSyncRefresher : public ProfileSyncServiceObserver {
pval...(no longer on Chromium) 2014/12/18 01:47:25 The prefix of P2P immediately makes me think of th
shadi 2014/12/19 19:15:12 I wanted to capture in the name that we are sendin
pval...(no longer on Chromium) 2014/12/22 23:49:39 ok, fair enough, I am fine with this name
+ public:
+ explicit P2PSyncRefresher(ProfileSyncService* sync_service);
+ ~P2PSyncRefresher() override;
Nicolas Zea 2014/12/18 20:55:25 Hmm, I'm pretty sure this is supposed to be virtua
shadi 2014/12/19 19:15:12 Done.
+
+ // Implementation of ProfileSyncServiceObserver
+ void OnStateChanged() override;
+ void OnSyncCycleCompleted() override;
+
+ private:
+ ProfileSyncService* sync_service_;
+
+ DISALLOW_COPY_AND_ASSIGN(P2PSyncRefresher);
+};
+
+#endif // CHROME_BROWSER_SYNC_TEST_INTEGRATION_P2P_SYNC_REFRESHER_H_
« no previous file with comments | « chrome/browser/sync/test/integration/bookmarks_helper.cc ('k') | chrome/browser/sync/test/integration/p2p_sync_refresher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698