OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_FAKE_SERVER_MATCH_STATUS_CHECKER_H_ | 5 #ifndef CHROME_BROWSER_SYNC_TEST_INTEGRATION_FAKE_SERVER_MATCH_STATUS_CHECKER_H_ |
6 #define CHROME_BROWSER_SYNC_TEST_INTEGRATION_FAKE_SERVER_MATCH_STATUS_CHECKER_H_ | 6 #define CHROME_BROWSER_SYNC_TEST_INTEGRATION_FAKE_SERVER_MATCH_STATUS_CHECKER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "chrome/browser/sync/test/integration/status_change_checker.h" | 10 #include "chrome/browser/sync/test/integration/status_change_checker.h" |
11 #include "sync/internal_api/public/base/model_type.h" | 11 #include "components/sync/base/model_type.h" |
12 #include "sync/test/fake_server/fake_server.h" | 12 #include "components/sync/test/fake_server/fake_server.h" |
13 | 13 |
14 namespace fake_server { | 14 namespace fake_server { |
15 | 15 |
16 // A matcher that checks a generic condition against the fake server. This class | 16 // A matcher that checks a generic condition against the fake server. This class |
17 // is abstract where any subclass will be responsible for implementing some of | 17 // is abstract where any subclass will be responsible for implementing some of |
18 // StatusChangeChecker's virtual methods. | 18 // StatusChangeChecker's virtual methods. |
19 class FakeServerMatchStatusChecker : public StatusChangeChecker, | 19 class FakeServerMatchStatusChecker : public StatusChangeChecker, |
20 public FakeServer::Observer { | 20 public FakeServer::Observer { |
21 public: | 21 public: |
22 FakeServerMatchStatusChecker(); | 22 FakeServerMatchStatusChecker(); |
23 void Wait(); | 23 void Wait(); |
24 void OnCommit(const std::string& committer_id, | 24 void OnCommit(const std::string& committer_id, |
25 syncer::ModelTypeSet committed_model_types) override; | 25 syncer::ModelTypeSet committed_model_types) override; |
26 | 26 |
27 protected: | 27 protected: |
28 FakeServer* fake_server() const; | 28 FakeServer* fake_server() const; |
29 | 29 |
30 private: | 30 private: |
31 FakeServer* fake_server_; | 31 FakeServer* fake_server_; |
32 }; | 32 }; |
33 | 33 |
34 } // namespace fake_server | 34 } // namespace fake_server |
35 | 35 |
36 #endif // CHROME_BROWSER_SYNC_TEST_INTEGRATION_FAKE_SERVER_MATCH_STATUS_CHECKER
_H_ | 36 #endif // CHROME_BROWSER_SYNC_TEST_INTEGRATION_FAKE_SERVER_MATCH_STATUS_CHECKER
_H_ |
OLD | NEW |