consent_sync_bridge.h 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. // Copyright 2018 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.
  4. #ifndef COMPONENTS_CONSENT_AUDITOR_CONSENT_SYNC_BRIDGE_H_
  5. #define COMPONENTS_CONSENT_AUDITOR_CONSENT_SYNC_BRIDGE_H_
  6. #include <memory>
  7. #include "base/memory/weak_ptr.h"
  8. namespace syncer {
  9. class ModelTypeControllerDelegate;
  10. }
  11. namespace sync_pb {
  12. class UserConsentSpecifics;
  13. }
  14. namespace consent_auditor {
  15. class ConsentSyncBridge {
  16. public:
  17. ConsentSyncBridge() = default;
  18. ConsentSyncBridge(const ConsentSyncBridge&) = delete;
  19. ConsentSyncBridge& operator=(const ConsentSyncBridge&) = delete;
  20. virtual ~ConsentSyncBridge() = default;
  21. virtual void RecordConsent(
  22. std::unique_ptr<sync_pb::UserConsentSpecifics> specifics) = 0;
  23. // Returns the delegate for the controller, i.e. sync integration point.
  24. virtual base::WeakPtr<syncer::ModelTypeControllerDelegate>
  25. GetControllerDelegate() = 0;
  26. };
  27. } // namespace consent_auditor
  28. #endif // COMPONENTS_CONSENT_AUDITOR_CONSENT_SYNC_BRIDGE_H_