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 COMPONENTS_PROXIMITY_AUTH_CRYPTAUTH_ENROLLER_H
6 #define COMPONENTS_PROXIMITY_AUTH_CRYPTAUTH_ENROLLER_H
10 #include "base/callback_forward.h"
11 #include "components/proximity_auth/cryptauth/proto/cryptauth_api.pb.h"
13 namespace proximity_auth
{
15 // Interface for enrolling a device with CryptAuth.
16 class CryptAuthEnroller
{
18 // Enrolls the device with |device_info| properties for a given
19 // |invocation_reason|. |callback| will be called with true if the enrollment
20 // succeeds and false otherwise.
21 typedef base::Callback
<void(bool)> EnrollmentFinishedCallback
;
22 virtual void Enroll(const cryptauth::GcmDeviceInfo
& device_info
,
23 cryptauth::InvocationReason invocation_reason
,
24 const EnrollmentFinishedCallback
& callback
) = 0;
27 } // namespace proximity_auth
29 #endif // COMPONENTS_PROXIMITY_AUTH_CRYPTAUTH_ENROLLER_H