| OLD | NEW |
| (Empty) | |
| 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. |
| 4 |
| 5 #include "chrome/browser/sync/test/integration/multi_client_status_change_checke
r.h" |
| 6 |
| 7 #include "chrome/browser/sync/profile_sync_service.h" |
| 8 #include "chrome/browser/sync/profile_sync_service_observer.h" |
| 9 |
| 10 MultiClientStatusChangeChecker::MultiClientStatusChangeChecker( |
| 11 std::vector<ProfileSyncService*> services) : services_(services) {} |
| 12 |
| 13 MultiClientStatusChangeChecker::~MultiClientStatusChangeChecker() {} |
| 14 |
| 15 base::TimeDelta MultiClientStatusChangeChecker::GetTimeoutDuration() { |
| 16 return base::TimeDelta::FromSeconds(45); |
| 17 } |
| 18 |
| 19 void MultiClientStatusChangeChecker::InitObserver( |
| 20 ProfileSyncServiceObserver* obs) { |
| 21 for (ServiceList::iterator it = services_.begin(); |
| 22 it != services_.end(); ++it) { |
| 23 (*it)->AddObserver(obs); |
| 24 } |
| 25 } |
| 26 |
| 27 void MultiClientStatusChangeChecker::UninitObserver( |
| 28 ProfileSyncServiceObserver* obs) { |
| 29 for (ServiceList::iterator it = services_.begin(); |
| 30 it != services_.end(); ++it) { |
| 31 (*it)->RemoveObserver(obs); |
| 32 } |
| 33 } |
| OLD | NEW |