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

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

Issue 2379433002: [Sync] Refactoring of sync integration test checkers to remove boilerplate await methods. (Closed)
Patch Set: Rebase 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 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 "components/sync/base/model_type.h" 11 #include "components/sync/base/model_type.h"
12 #include "components/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 ~FakeServerMatchStatusChecker() override;
24
25 // FakeServer::Observer implementation.
24 void OnCommit(const std::string& committer_id, 26 void OnCommit(const std::string& committer_id,
25 syncer::ModelTypeSet committed_model_types) override; 27 syncer::ModelTypeSet committed_model_types) override;
26 28
27 protected: 29 protected:
28 FakeServer* fake_server() const; 30 FakeServer* fake_server() const;
29 31
30 private: 32 private:
31 FakeServer* fake_server_; 33 FakeServer* fake_server_;
32 }; 34 };
33 35
34 } // namespace fake_server 36 } // namespace fake_server
35 37
36 #endif // CHROME_BROWSER_SYNC_TEST_INTEGRATION_FAKE_SERVER_MATCH_STATUS_CHECKER _H_ 38 #endif // CHROME_BROWSER_SYNC_TEST_INTEGRATION_FAKE_SERVER_MATCH_STATUS_CHECKER _H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698