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/sync_integration_test_util.h" | 5 #include "chrome/browser/sync/test/integration/sync_integration_test_util.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/strings/stringprintf.h" | 9 #include "base/strings/stringprintf.h" |
10 #include "chrome/browser/sync/test/integration/fake_server_match_status_checker.
h" | 10 #include "chrome/browser/sync/test/integration/fake_server_match_status_checker.
h" |
11 #include "chrome/browser/sync/test/integration/single_client_status_change_check
er.h" | 11 #include "chrome/browser/sync/test/integration/single_client_status_change_check
er.h" |
12 #include "chrome/browser/sync/test/integration/updated_progress_marker_checker.h
" | 12 #include "chrome/browser/sync/test/integration/updated_progress_marker_checker.h
" |
13 #include "components/browser_sync/browser/profile_sync_service.h" | 13 #include "components/browser_sync/profile_sync_service.h" |
14 | 14 |
15 namespace { | 15 namespace { |
16 | 16 |
17 // Helper class to block until the server has a given number of entities. | 17 // Helper class to block until the server has a given number of entities. |
18 class ServerCountMatchStatusChecker | 18 class ServerCountMatchStatusChecker |
19 : public fake_server::FakeServerMatchStatusChecker { | 19 : public fake_server::FakeServerMatchStatusChecker { |
20 public: | 20 public: |
21 ServerCountMatchStatusChecker(syncer::ModelType type, size_t count) | 21 ServerCountMatchStatusChecker(syncer::ModelType type, size_t count) |
22 : type_(type), count_(count) {} | 22 : type_(type), count_(count) {} |
23 ~ServerCountMatchStatusChecker() override {} | 23 ~ServerCountMatchStatusChecker() override {} |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 return !checker.TimedOut(); | 86 return !checker.TimedOut(); |
87 } | 87 } |
88 | 88 |
89 bool AwaitServerCount(syncer::ModelType type, size_t count) { | 89 bool AwaitServerCount(syncer::ModelType type, size_t count) { |
90 ServerCountMatchStatusChecker checker(type, count); | 90 ServerCountMatchStatusChecker checker(type, count); |
91 checker.Wait(); | 91 checker.Wait(); |
92 return !checker.TimedOut(); | 92 return !checker.TimedOut(); |
93 } | 93 } |
94 | 94 |
95 } // namespace sync_integration_test_util | 95 } // namespace sync_integration_test_util |
OLD | NEW |