chromium/chrome/browser/sync/test/integration/send_tab_to_self_helper.h

// Copyright 2019 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef CHROME_BROWSER_SYNC_TEST_INTEGRATION_SEND_TAB_TO_SELF_HELPER_H_
#define CHROME_BROWSER_SYNC_TEST_INTEGRATION_SEND_TAB_TO_SELF_HELPER_H_

#include <string>
#include <vector>

#include "base/memory/raw_ptr.h"
#include "chrome/browser/sync/test/integration/status_change_checker.h"
#include "components/send_tab_to_self/send_tab_to_self_model_observer.h"
#include "components/sync_device_info/device_info_tracker.h"
#include "url/gurl.h"

namespace send_tab_to_self {
class SendTabToSelfEntry;
class SendTabToSelfSyncService;
}  // namespace send_tab_to_self

namespace send_tab_to_self_helper {

// Class that allows waiting until a particular |url| is exposed by the
// SendTabToSelfModel in |service|.
class SendTabToSelfUrlChecker
    : public StatusChangeChecker,
      public send_tab_to_self::SendTabToSelfModelObserver {};

// Class that allows waiting until a particular |url| is marked opened by the
// SendTabToSelfModel in |service|.
class SendTabToSelfUrlOpenedChecker
    : public StatusChangeChecker,
      public send_tab_to_self::SendTabToSelfModelObserver {};

// Class that allows waiting the number of entries in until |service0|
// matches the number of entries in |service1|.
class SendTabToSelfModelEqualityChecker
    : public StatusChangeChecker,
      public send_tab_to_self::SendTabToSelfModelObserver {};

// Class that allows waiting until the bridge is ready.
class SendTabToSelfActiveChecker
    : public StatusChangeChecker,
      public send_tab_to_self::SendTabToSelfModelObserver {};

// Class that allows waiting until two devices are ready.
class SendTabToSelfMultiDeviceActiveChecker
    : public StatusChangeChecker,
      public syncer::DeviceInfoTracker::Observer {};

// Class that allows waiting until device has send_tab_to_self disabled.
class SendTabToSelfDeviceDisabledChecker
    : public StatusChangeChecker,
      public syncer::DeviceInfoTracker::Observer {};

class SendTabToSelfUrlDeletedChecker
    : public StatusChangeChecker,
      public send_tab_to_self::SendTabToSelfModelObserver {};

}  // namespace send_tab_to_self_helper

#endif  // CHROME_BROWSER_SYNC_TEST_INTEGRATION_SEND_TAB_TO_SELF_HELPER_H_