OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/browser/sync/test/integration/quiesce_status_change_checker.h" | 5 #include "chrome/browser/sync/test/integration/quiesce_status_change_checker.h" |
6 | 6 |
7 #include "base/format_macros.h" | 7 #include "base/format_macros.h" |
8 #include "base/scoped_observer.h" | 8 #include "base/scoped_observer.h" |
9 #include "base/strings/string_number_conversions.h" | 9 #include "base/strings/string_number_conversions.h" |
10 #include "base/strings/stringprintf.h" | 10 #include "base/strings/stringprintf.h" |
11 #include "chrome/browser/sync/profile_sync_service.h" | 11 #include "components/browser_sync/browser/profile_sync_service.h" |
12 #include "sync/internal_api/public/sessions/sync_session_snapshot.h" | 12 #include "sync/internal_api/public/sessions/sync_session_snapshot.h" |
13 | 13 |
14 namespace { | 14 namespace { |
15 | 15 |
16 // Returns true if this service is disabled. | 16 // Returns true if this service is disabled. |
17 bool IsSyncDisabled(ProfileSyncService* service) { | 17 bool IsSyncDisabled(ProfileSyncService* service) { |
18 return !service->IsSetupInProgress() && !service->HasSyncSetupCompleted(); | 18 return !service->IsSetupInProgress() && !service->HasSyncSetupCompleted(); |
19 } | 19 } |
20 | 20 |
21 // Returns true if these services have matching progress markers. | 21 // Returns true if these services have matching progress markers. |
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
213 | 213 |
214 std::string QuiesceStatusChangeChecker::GetDebugMessage() const { | 214 std::string QuiesceStatusChangeChecker::GetDebugMessage() const { |
215 return base::StringPrintf("Waiting for quiescence of %" PRIuS " clients", | 215 return base::StringPrintf("Waiting for quiescence of %" PRIuS " clients", |
216 services_.size()); | 216 services_.size()); |
217 } | 217 } |
218 | 218 |
219 void QuiesceStatusChangeChecker::OnServiceStateChanged( | 219 void QuiesceStatusChangeChecker::OnServiceStateChanged( |
220 ProfileSyncService* service) { | 220 ProfileSyncService* service) { |
221 CheckExitCondition(); | 221 CheckExitCondition(); |
222 } | 222 } |
OLD | NEW |