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

Unified Diff: chrome/browser/sync/test/integration/multi_client_status_change_checker.cc

Issue 165393010: Draft: Moving code out of ProfileSyncServiceHarness (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 10 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/test/integration/multi_client_status_change_checker.cc
diff --git a/chrome/browser/sync/test/integration/multi_client_status_change_checker.cc b/chrome/browser/sync/test/integration/multi_client_status_change_checker.cc
new file mode 100644
index 0000000000000000000000000000000000000000..53972f161be1775d6cddb43e3c14143ff830ea91
--- /dev/null
+++ b/chrome/browser/sync/test/integration/multi_client_status_change_checker.cc
@@ -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.
+
+#include "chrome/browser/sync/test/integration/multi_client_status_change_checker.h"
+
+#include "chrome/browser/sync/profile_sync_service.h"
+#include "chrome/browser/sync/profile_sync_service_observer.h"
+
+MultiClientStatusChangeChecker::MultiClientStatusChangeChecker(
+ std::vector<ProfileSyncService*> services) : services_(services) {}
+
+MultiClientStatusChangeChecker::~MultiClientStatusChangeChecker() {}
+
+base::TimeDelta MultiClientStatusChangeChecker::GetTimeoutDuration() {
+ return base::TimeDelta::FromSeconds(45);
+}
+
+void MultiClientStatusChangeChecker::InitObserver(
+ ProfileSyncServiceObserver* obs) {
+ for (ServiceList::iterator it = services_.begin();
+ it != services_.end(); ++it) {
+ (*it)->AddObserver(obs);
+ }
+}
+
+void MultiClientStatusChangeChecker::UninitObserver(
+ ProfileSyncServiceObserver* obs) {
+ for (ServiceList::iterator it = services_.begin();
+ it != services_.end(); ++it) {
+ (*it)->RemoveObserver(obs);
+ }
+}

Powered by Google App Engine
This is Rietveld 408576698