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

Side by Side Diff: chrome/browser/sync/test/integration/multi_client_status_change_checker.h

Issue 2388673002: Revert of [Sync] Move //components/sync to the syncer namespace. (patchset #5 id:40001 of https://co (Closed)
Patch Set: Created 4 years, 2 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 #ifndef CHROME_BROWSER_SYNC_TEST_INTEGRATION_MULTI_CLIENT_STATUS_CHANGE_CHECKER_ H_ 5 #ifndef CHROME_BROWSER_SYNC_TEST_INTEGRATION_MULTI_CLIENT_STATUS_CHANGE_CHECKER_ H_
6 #define CHROME_BROWSER_SYNC_TEST_INTEGRATION_MULTI_CLIENT_STATUS_CHANGE_CHECKER_ H_ 6 #define CHROME_BROWSER_SYNC_TEST_INTEGRATION_MULTI_CLIENT_STATUS_CHANGE_CHECKER_ H_
7 7
8 #include <string>
9 #include <vector> 8 #include <vector>
10 9
11 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
12 #include "base/time/time.h" 11 #include "base/time/time.h"
13 #include "chrome/browser/sync/test/integration/status_change_checker.h" 12 #include "chrome/browser/sync/test/integration/status_change_checker.h"
14 #include "components/sync/driver/sync_service_observer.h" 13 #include "components/sync/driver/sync_service_observer.h"
15 14
16 namespace browser_sync { 15 namespace browser_sync {
17 class ProfileSyncService; 16 class ProfileSyncService;
18 } // namespace browser_sync 17 } // namespace browser_sync
19 18
20 // This class provides some common functionality for StatusChangeCheckers that 19 // This class provides some common functionality for StatusChangeCheckers that
21 // observe many ProfileSyncServices. This class is abstract. Its descendants 20 // observe many ProfileSyncServices. This class is abstract. Its descendants
22 // are expected to provide additional functionality. 21 // are expected to provide additional functionality.
23 class MultiClientStatusChangeChecker : public StatusChangeChecker, 22 class MultiClientStatusChangeChecker : public StatusChangeChecker,
24 public syncer::SyncServiceObserver { 23 public sync_driver::SyncServiceObserver {
25 public: 24 public:
26 explicit MultiClientStatusChangeChecker( 25 explicit MultiClientStatusChangeChecker(
27 std::vector<browser_sync::ProfileSyncService*> services); 26 std::vector<browser_sync::ProfileSyncService*> services);
28 ~MultiClientStatusChangeChecker() override; 27 ~MultiClientStatusChangeChecker() override;
29 28
30 // Called when waiting times out. 29 // Called when waiting times out.
31 void OnTimeout(); 30 void OnTimeout();
32 31
33 // Blocks until the exit condition is satisfied or a timeout occurs. 32 // Blocks until the exit condition is satisfied or a timeout occurs.
34 void Wait(); 33 void Wait();
35 34
36 // syncer::SyncServiceObserver implementation. 35 // sync_driver::SyncServiceObserver implementation.
37 void OnStateChanged() override; 36 void OnStateChanged() override;
38 37
39 // StatusChangeChecker implementations and stubs. 38 // StatusChangeChecker implementations and stubs.
40 bool IsExitConditionSatisfied() override = 0; 39 bool IsExitConditionSatisfied() override = 0;
41 std::string GetDebugMessage() const override = 0; 40 std::string GetDebugMessage() const override = 0;
42 41
43 protected: 42 protected:
44 const std::vector<browser_sync::ProfileSyncService*>& services() { 43 const std::vector<browser_sync::ProfileSyncService*>& services() {
45 return services_; 44 return services_;
46 } 45 }
47 46
48 private: 47 private:
49 std::vector<browser_sync::ProfileSyncService*> services_; 48 std::vector<browser_sync::ProfileSyncService*> services_;
50 }; 49 };
51 50
52 #endif // CHROME_BROWSER_SYNC_TEST_INTEGRATION_MULTI_CLIENT_STATUS_CHANGE_CHECK ER_H_ 51 #endif // CHROME_BROWSER_SYNC_TEST_INTEGRATION_MULTI_CLIENT_STATUS_CHANGE_CHECK ER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698