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

Side by Side Diff: chrome/browser/sync/test/integration/sync_integration_test_util.cc

Issue 2345843003: [Sync] Merge //components/browser_sync into one directory. (Closed)
Patch Set: Address comment + rebase. Created 4 years, 3 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 unified diff | Download patch
OLDNEW
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698