1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_SYNC_TEST_INTEGRATION_AWAIT_MATCH_STATUS_CHANGE_CHECKER_H_
6 #define CHROME_BROWSER_SYNC_TEST_INTEGRATION_AWAIT_MATCH_STATUS_CHANGE_CHECKER_H_
10 #include "base/basictypes.h"
11 #include "base/callback.h"
12 #include "base/compiler_specific.h"
13 #include "chrome/browser/sync/test/integration/multi_client_status_change_checker.h"
15 // Helper class used in the datatype specific AwaitAllModelsMatch
16 // implementations. |conditon| should be a datatype specific condition that
17 // verifies the state of all the profiles involved in the test.
18 class AwaitMatchStatusChangeChecker
: public MultiClientStatusChangeChecker
{
20 typedef base::Callback
<bool(void)> ExitConditionCallback
;
22 AwaitMatchStatusChangeChecker(const ExitConditionCallback
& condition
,
23 const std::string
& debug_message
);
24 ~AwaitMatchStatusChangeChecker() override
;
26 bool IsExitConditionSatisfied() override
;
27 std::string
GetDebugMessage() const override
;
30 ExitConditionCallback condition_
;
31 std::string debug_message_
;
34 #endif // CHROME_BROWSER_SYNC_TEST_INTEGRATION_AWAIT_MATCH_STATUS_CHANGE_CHECKER_H_