1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "chrome/browser/sync/test/integration/multi_client_status_change_checker.h"
7 #include "base/logging.h"
8 #include "base/scoped_observer.h"
9 #include "chrome/browser/sync/profile_sync_service.h"
11 MultiClientStatusChangeChecker::MultiClientStatusChangeChecker(
12 std::vector
<ProfileSyncService
*> services
)
13 : services_(services
) {}
15 MultiClientStatusChangeChecker::~MultiClientStatusChangeChecker() {}
17 void MultiClientStatusChangeChecker::Wait() {
18 DVLOG(1) << "Await: " << GetDebugMessage();
20 if (IsExitConditionSatisfied()) {
21 DVLOG(1) << "Await -> Exit before waiting: " << GetDebugMessage();
25 ScopedObserver
<ProfileSyncService
, MultiClientStatusChangeChecker
> obs(this);
26 for (std::vector
<ProfileSyncService
*>::iterator it
= services_
.begin();
27 it
!= services_
.end(); ++it
) {
34 void MultiClientStatusChangeChecker::OnStateChanged() {