File: autofill_private_api.h

package info (click to toggle)
chromium 138.0.7204.183-1~deb12u1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm-proposed-updates
  • size: 6,080,960 kB
  • sloc: cpp: 34,937,079; ansic: 7,176,967; javascript: 4,110,704; python: 1,419,954; asm: 946,768; xml: 739,971; pascal: 187,324; sh: 89,623; perl: 88,663; objc: 79,944; sql: 50,304; cs: 41,786; fortran: 24,137; makefile: 21,811; php: 13,980; tcl: 13,166; yacc: 8,925; ruby: 7,485; awk: 3,720; lisp: 3,096; lex: 1,327; ada: 727; jsp: 228; sed: 36
file content (595 lines) | stat: -rw-r--r-- 22,356 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
// Copyright 2015 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_EXTENSIONS_API_AUTOFILL_PRIVATE_AUTOFILL_PRIVATE_API_H_
#define CHROME_BROWSER_EXTENSIONS_API_AUTOFILL_PRIVATE_AUTOFILL_PRIVATE_API_H_

#include "components/prefs/pref_service.h"
#include "extensions/browser/extension_function.h"
#include "extensions/browser/extension_function_histogram_value.h"

namespace autofill {
class AddressDataManager;
class ContentAutofillClient;
class PaymentsDataManager;
}  // namespace autofill

namespace extensions {

// A small helper class that exposes getters for Autofill's data managers.
class AutofillPrivateExtensionFunction : public ExtensionFunction {
 public:
  AutofillPrivateExtensionFunction() = default;
  AutofillPrivateExtensionFunction(const AutofillPrivateExtensionFunction&) =
      delete;
  AutofillPrivateExtensionFunction& operator=(
      const AutofillPrivateExtensionFunction&) = delete;

 protected:
  ~AutofillPrivateExtensionFunction() override = default;

  autofill::AddressDataManager* address_data_manager();
  autofill::ContentAutofillClient* autofill_client();
  autofill::PaymentsDataManager* payments_data_manager();
};

class AutofillPrivateGetAccountInfoFunction
    : public AutofillPrivateExtensionFunction {
 public:
  AutofillPrivateGetAccountInfoFunction() = default;
  AutofillPrivateGetAccountInfoFunction(
      const AutofillPrivateGetAccountInfoFunction&) = delete;
  AutofillPrivateGetAccountInfoFunction& operator=(
      const AutofillPrivateGetAccountInfoFunction&) = delete;
  DECLARE_EXTENSION_FUNCTION("autofillPrivate.getAccountInfo",
                             AUTOFILLPRIVATE_GETACCOUNTINFO)

 protected:
  ~AutofillPrivateGetAccountInfoFunction() override = default;

  // ExtensionFunction overrides.
  ResponseAction Run() override;
};

class AutofillPrivateSaveAddressFunction
    : public AutofillPrivateExtensionFunction {
 public:
  AutofillPrivateSaveAddressFunction() = default;
  AutofillPrivateSaveAddressFunction(
      const AutofillPrivateSaveAddressFunction&) = delete;
  AutofillPrivateSaveAddressFunction& operator=(
      const AutofillPrivateSaveAddressFunction&) = delete;
  DECLARE_EXTENSION_FUNCTION("autofillPrivate.saveAddress",
                             AUTOFILLPRIVATE_SAVEADDRESS)

 protected:
  ~AutofillPrivateSaveAddressFunction() override = default;

  // ExtensionFunction overrides.
  ResponseAction Run() override;
};

class AutofillPrivateRemoveAddressFunction
    : public AutofillPrivateExtensionFunction {
 public:
  AutofillPrivateRemoveAddressFunction() = default;
  AutofillPrivateRemoveAddressFunction(
      const AutofillPrivateRemoveAddressFunction&) = delete;
  AutofillPrivateRemoveAddressFunction& operator=(
      const AutofillPrivateRemoveAddressFunction&) = delete;
  DECLARE_EXTENSION_FUNCTION("autofillPrivate.removeAddress",
                             AUTOFILLPRIVATE_REMOVEADDRESS)

 protected:
  ~AutofillPrivateRemoveAddressFunction() override = default;

  // ExtensionFunction overrides.
  ResponseAction Run() override;
};

class AutofillPrivateGetCountryListFunction
    : public AutofillPrivateExtensionFunction {
 public:
  AutofillPrivateGetCountryListFunction() = default;
  AutofillPrivateGetCountryListFunction(
      const AutofillPrivateGetCountryListFunction&) = delete;
  AutofillPrivateGetCountryListFunction& operator=(
      const AutofillPrivateGetCountryListFunction&) = delete;
  DECLARE_EXTENSION_FUNCTION("autofillPrivate.getCountryList",
                             AUTOFILLPRIVATE_GETCOUNTRYLIST)

 protected:
  ~AutofillPrivateGetCountryListFunction() override = default;

  // ExtensionFunction overrides.
  ResponseAction Run() override;
};

class AutofillPrivateGetAddressComponentsFunction
    : public AutofillPrivateExtensionFunction {
 public:
  AutofillPrivateGetAddressComponentsFunction() = default;
  AutofillPrivateGetAddressComponentsFunction(
      const AutofillPrivateGetAddressComponentsFunction&) = delete;
  AutofillPrivateGetAddressComponentsFunction& operator=(
      const AutofillPrivateGetAddressComponentsFunction&) = delete;
  DECLARE_EXTENSION_FUNCTION("autofillPrivate.getAddressComponents",
                             AUTOFILLPRIVATE_GETADDRESSCOMPONENTS)

 protected:
  ~AutofillPrivateGetAddressComponentsFunction() override = default;

  // ExtensionFunction overrides.
  ResponseAction Run() override;
};

class AutofillPrivateGetAddressListFunction
    : public AutofillPrivateExtensionFunction {
 public:
  AutofillPrivateGetAddressListFunction() = default;
  AutofillPrivateGetAddressListFunction(
      const AutofillPrivateGetAddressListFunction&) = delete;
  AutofillPrivateGetAddressListFunction& operator=(
      const AutofillPrivateGetAddressListFunction&) = delete;
  DECLARE_EXTENSION_FUNCTION("autofillPrivate.getAddressList",
                             AUTOFILLPRIVATE_GETADDRESSLIST)

 protected:
  ~AutofillPrivateGetAddressListFunction() override = default;

  // ExtensionFunction overrides.
  ResponseAction Run() override;
};

class AutofillPrivateSaveCreditCardFunction
    : public AutofillPrivateExtensionFunction {
 public:
  AutofillPrivateSaveCreditCardFunction() = default;
  AutofillPrivateSaveCreditCardFunction(
      const AutofillPrivateSaveCreditCardFunction&) = delete;
  AutofillPrivateSaveCreditCardFunction& operator=(
      const AutofillPrivateSaveCreditCardFunction&) = delete;
  DECLARE_EXTENSION_FUNCTION("autofillPrivate.saveCreditCard",
                             AUTOFILLPRIVATE_SAVECREDITCARD)

 protected:
  ~AutofillPrivateSaveCreditCardFunction() override = default;

  // ExtensionFunction overrides.
  ResponseAction Run() override;
};

class AutofillPrivateRemovePaymentsEntityFunction
    : public AutofillPrivateExtensionFunction {
 public:
  AutofillPrivateRemovePaymentsEntityFunction() = default;
  AutofillPrivateRemovePaymentsEntityFunction(
      const AutofillPrivateRemovePaymentsEntityFunction&) = delete;
  AutofillPrivateRemovePaymentsEntityFunction& operator=(
      const AutofillPrivateRemovePaymentsEntityFunction&) = delete;
  DECLARE_EXTENSION_FUNCTION("autofillPrivate.removePaymentsEntity",
                             AUTOFILLPRIVATE_REMOVEPAYMENTSENTITY)

 protected:
  ~AutofillPrivateRemovePaymentsEntityFunction() override = default;

  // ExtensionFunction overrides.
  ResponseAction Run() override;
};

class AutofillPrivateGetCreditCardListFunction
    : public AutofillPrivateExtensionFunction {
 public:
  AutofillPrivateGetCreditCardListFunction() = default;
  AutofillPrivateGetCreditCardListFunction(
      const AutofillPrivateGetCreditCardListFunction&) = delete;
  AutofillPrivateGetCreditCardListFunction& operator=(
      const AutofillPrivateGetCreditCardListFunction&) = delete;
  DECLARE_EXTENSION_FUNCTION("autofillPrivate.getCreditCardList",
                             AUTOFILLPRIVATE_GETCREDITCARDLIST)

 protected:
  ~AutofillPrivateGetCreditCardListFunction() override = default;

  // ExtensionFunction overrides.
  ResponseAction Run() override;
};

class AutofillPrivateLogServerCardLinkClickedFunction
    : public AutofillPrivateExtensionFunction {
 public:
  AutofillPrivateLogServerCardLinkClickedFunction() = default;
  AutofillPrivateLogServerCardLinkClickedFunction(
      const AutofillPrivateLogServerCardLinkClickedFunction&) = delete;
  AutofillPrivateLogServerCardLinkClickedFunction& operator=(
      const AutofillPrivateLogServerCardLinkClickedFunction&) = delete;
  DECLARE_EXTENSION_FUNCTION("autofillPrivate.logServerCardLinkClicked",
                             AUTOFILLPRIVATE_SERVERCARDLINKCLICKED)

 protected:
  ~AutofillPrivateLogServerCardLinkClickedFunction() override = default;

  // ExtensionFunction overrides.
  ResponseAction Run() override;
};

class AutofillPrivateLogServerIbanLinkClickedFunction
    : public AutofillPrivateExtensionFunction {
 public:
  AutofillPrivateLogServerIbanLinkClickedFunction() = default;
  AutofillPrivateLogServerIbanLinkClickedFunction(
      const AutofillPrivateLogServerIbanLinkClickedFunction&) = delete;
  AutofillPrivateLogServerIbanLinkClickedFunction& operator=(
      const AutofillPrivateLogServerIbanLinkClickedFunction&) = delete;
  DECLARE_EXTENSION_FUNCTION("autofillPrivate.logServerIbanLinkClicked",
                             AUTOFILLPRIVATE_SERVERIBANLINKCLICKED)

 protected:
  ~AutofillPrivateLogServerIbanLinkClickedFunction() override = default;

  // ExtensionFunction overrides.
  ResponseAction Run() override;
};

class AutofillPrivateSaveIbanFunction
    : public AutofillPrivateExtensionFunction {
 public:
  AutofillPrivateSaveIbanFunction() = default;
  AutofillPrivateSaveIbanFunction(const AutofillPrivateSaveIbanFunction&) =
      delete;
  AutofillPrivateSaveIbanFunction& operator=(
      const AutofillPrivateSaveIbanFunction&) = delete;
  DECLARE_EXTENSION_FUNCTION("autofillPrivate.saveIban",
                             AUTOFILLPRIVATE_SAVEIBAN)

 protected:
  ~AutofillPrivateSaveIbanFunction() override = default;

  // ExtensionFunction overrides.
  ResponseAction Run() override;
};

class AutofillPrivateGetIbanListFunction
    : public AutofillPrivateExtensionFunction {
 public:
  AutofillPrivateGetIbanListFunction() = default;
  AutofillPrivateGetIbanListFunction(
      const AutofillPrivateGetIbanListFunction&) = delete;
  AutofillPrivateGetIbanListFunction& operator=(
      const AutofillPrivateGetIbanListFunction&) = delete;
  DECLARE_EXTENSION_FUNCTION("autofillPrivate.getIbanList",
                             AUTOFILLPRIVATE_GETIBANLIST)

 protected:
  ~AutofillPrivateGetIbanListFunction() override = default;

  // ExtensionFunction overrides.
  ResponseAction Run() override;
};

class AutofillPrivateIsValidIbanFunction
    : public AutofillPrivateExtensionFunction {
 public:
  AutofillPrivateIsValidIbanFunction() = default;
  AutofillPrivateIsValidIbanFunction(
      const AutofillPrivateIsValidIbanFunction&) = delete;
  AutofillPrivateIsValidIbanFunction& operator=(
      const AutofillPrivateIsValidIbanFunction&) = delete;
  DECLARE_EXTENSION_FUNCTION("autofillPrivate.isValidIban",
                             AUTOFILLPRIVATE_ISVALIDIBAN)

 protected:
  ~AutofillPrivateIsValidIbanFunction() override = default;

  // ExtensionFunction overrides.
  ResponseAction Run() override;
};

class AutofillPrivateAddVirtualCardFunction
    : public AutofillPrivateExtensionFunction {
 public:
  AutofillPrivateAddVirtualCardFunction() = default;
  AutofillPrivateAddVirtualCardFunction(
      const AutofillPrivateAddVirtualCardFunction&) = delete;
  AutofillPrivateAddVirtualCardFunction& operator=(
      const AutofillPrivateAddVirtualCardFunction&) = delete;
  DECLARE_EXTENSION_FUNCTION("autofillPrivate.addVirtualCard",
                             AUTOFILLPRIVATE_ADDVIRTUALCARD)

 protected:
  ~AutofillPrivateAddVirtualCardFunction() override = default;

  // ExtensionFunction overrides.
  ResponseAction Run() override;
};

class AutofillPrivateRemoveVirtualCardFunction
    : public AutofillPrivateExtensionFunction {
 public:
  AutofillPrivateRemoveVirtualCardFunction() = default;
  AutofillPrivateRemoveVirtualCardFunction(
      const AutofillPrivateRemoveVirtualCardFunction&) = delete;
  AutofillPrivateRemoveVirtualCardFunction& operator=(
      const AutofillPrivateRemoveVirtualCardFunction&) = delete;
  DECLARE_EXTENSION_FUNCTION("autofillPrivate.removeVirtualCard",
                             AUTOFILLPRIVATE_REMOVEVIRTUALCARD)

 protected:
  ~AutofillPrivateRemoveVirtualCardFunction() override = default;

  // ExtensionFunction overrides.
  ResponseAction Run() override;
};

class AutofillPrivateGetPayOverTimeIssuerListFunction
    : public AutofillPrivateExtensionFunction {
 public:
  AutofillPrivateGetPayOverTimeIssuerListFunction() = default;
  AutofillPrivateGetPayOverTimeIssuerListFunction(
      const AutofillPrivateGetPayOverTimeIssuerListFunction&) = delete;
  AutofillPrivateGetPayOverTimeIssuerListFunction& operator=(
      const AutofillPrivateGetPayOverTimeIssuerListFunction&) = delete;
  DECLARE_EXTENSION_FUNCTION("autofillPrivate.getPayOverTimeIssuerList",
                             AUTOFILLPRIVATE_GETPAYOVERTIMEISSUERLIST)

 protected:
  ~AutofillPrivateGetPayOverTimeIssuerListFunction() override = default;

  // ExtensionFunction overrides.
  ResponseAction Run() override;
};

class AutofillPrivateAuthenticateUserAndFlipMandatoryAuthToggleFunction
    : public AutofillPrivateExtensionFunction {
 public:
  AutofillPrivateAuthenticateUserAndFlipMandatoryAuthToggleFunction() = default;
  AutofillPrivateAuthenticateUserAndFlipMandatoryAuthToggleFunction(
      const AutofillPrivateAuthenticateUserAndFlipMandatoryAuthToggleFunction&) =
      delete;
  AutofillPrivateAuthenticateUserAndFlipMandatoryAuthToggleFunction& operator=(
      const AutofillPrivateAuthenticateUserAndFlipMandatoryAuthToggleFunction&) =
      delete;
  DECLARE_EXTENSION_FUNCTION(
      "autofillPrivate.authenticateUserAndFlipMandatoryAuthToggle",
      AUTOFILLPRIVATE_AUTHENTICATEUSERANDFLIPMANDATORYAUTHTOGGLE)

 protected:
  ~AutofillPrivateAuthenticateUserAndFlipMandatoryAuthToggleFunction()
      override = default;

  // ExtensionFunction overrides.
  ResponseAction Run() override;

 private:
  void UpdateMandatoryAuthTogglePref(bool reauth_succeeded);
};

// Performs a local reauth before releasing data if reauth is enabled.
class AutofillPrivateGetLocalCardFunction
    : public AutofillPrivateExtensionFunction {
 public:
  AutofillPrivateGetLocalCardFunction() = default;
  AutofillPrivateGetLocalCardFunction(
      const AutofillPrivateGetLocalCardFunction&) = delete;
  AutofillPrivateGetLocalCardFunction& operator=(
      const AutofillPrivateGetLocalCardFunction&) = delete;
  DECLARE_EXTENSION_FUNCTION("autofillPrivate.getLocalCard",
                             AUTOFILLPRIVATE_GETLOCALCARD)

 protected:
  ~AutofillPrivateGetLocalCardFunction() override = default;

  // ExtensionFunction overrides.
  ResponseAction Run() override;

 private:
  void OnReauthFinished(bool can_retrieve);
  void ReturnCreditCard();
};

class AutofillPrivateCheckIfDeviceAuthAvailableFunction
    : public AutofillPrivateExtensionFunction {
 public:
  AutofillPrivateCheckIfDeviceAuthAvailableFunction() = default;
  AutofillPrivateCheckIfDeviceAuthAvailableFunction(
      const AutofillPrivateCheckIfDeviceAuthAvailableFunction&) = delete;
  AutofillPrivateCheckIfDeviceAuthAvailableFunction& operator=(
      const AutofillPrivateCheckIfDeviceAuthAvailableFunction&) = delete;
  DECLARE_EXTENSION_FUNCTION("autofillPrivate.checkIfDeviceAuthAvailable",
                             AUTOFILLPRIVATE_CHECKIFDEVICEAUTHAVAILABLE)

 protected:
  ~AutofillPrivateCheckIfDeviceAuthAvailableFunction() override = default;

  // ExtensionFunction overrides.
  ResponseAction Run() override;
};

class AutofillPrivateBulkDeleteAllCvcsFunction
    : public AutofillPrivateExtensionFunction {
 public:
  AutofillPrivateBulkDeleteAllCvcsFunction() = default;
  AutofillPrivateBulkDeleteAllCvcsFunction(
      const AutofillPrivateBulkDeleteAllCvcsFunction&) = delete;
  AutofillPrivateBulkDeleteAllCvcsFunction& operator=(
      const AutofillPrivateBulkDeleteAllCvcsFunction&) = delete;
  DECLARE_EXTENSION_FUNCTION("autofillPrivate.bulkDeleteAllCvcs",
                             AUTOFILLPRIVATE_BULKDELETEALLCVCS)

 protected:
  ~AutofillPrivateBulkDeleteAllCvcsFunction() override = default;

  // ExtensionFunction overrides.
  ResponseAction Run() override;
};

class AutofillPrivateSetAutofillSyncToggleEnabledFunction
    : public AutofillPrivateExtensionFunction {
 public:
  AutofillPrivateSetAutofillSyncToggleEnabledFunction() = default;
  AutofillPrivateSetAutofillSyncToggleEnabledFunction(
      const AutofillPrivateSetAutofillSyncToggleEnabledFunction&) = delete;
  AutofillPrivateSetAutofillSyncToggleEnabledFunction& operator=(
      const AutofillPrivateSetAutofillSyncToggleEnabledFunction&) = delete;
  DECLARE_EXTENSION_FUNCTION("autofillPrivate.setAutofillSyncToggleEnabled",
                             AUTOFILLPRIVATE_SETAUTOFILLSYNCTOGGLEENABLED)

 protected:
  ~AutofillPrivateSetAutofillSyncToggleEnabledFunction() override = default;

  // ExtensionFunction overrides.
  ResponseAction Run() override;
};

class AutofillPrivateAddOrUpdateEntityInstanceFunction
    : public AutofillPrivateExtensionFunction {
 public:
  AutofillPrivateAddOrUpdateEntityInstanceFunction() = default;
  AutofillPrivateAddOrUpdateEntityInstanceFunction(
      const AutofillPrivateAddOrUpdateEntityInstanceFunction&) = delete;
  AutofillPrivateAddOrUpdateEntityInstanceFunction& operator=(
      const AutofillPrivateAddOrUpdateEntityInstanceFunction&) = delete;
  DECLARE_EXTENSION_FUNCTION("autofillPrivate.addOrUpdateEntityInstance",
                             AUTOFILLPRIVATE_ADDORUPDATEENTITYINSTANCE)

 protected:
  ~AutofillPrivateAddOrUpdateEntityInstanceFunction() override = default;

  // ExtensionFunction overrides.
  ResponseAction Run() override;
};

class AutofillPrivateRemoveEntityInstanceFunction
    : public AutofillPrivateExtensionFunction {
 public:
  AutofillPrivateRemoveEntityInstanceFunction() = default;
  AutofillPrivateRemoveEntityInstanceFunction(
      const AutofillPrivateRemoveEntityInstanceFunction&) = delete;
  AutofillPrivateRemoveEntityInstanceFunction& operator=(
      const AutofillPrivateRemoveEntityInstanceFunction&) = delete;
  DECLARE_EXTENSION_FUNCTION("autofillPrivate.removeEntityInstance",
                             AUTOFILLPRIVATE_REMOVEENTITYINSTANCE)

 protected:
  ~AutofillPrivateRemoveEntityInstanceFunction() override = default;

  // ExtensionFunction overrides.
  ResponseAction Run() override;
};

class AutofillPrivateLoadEntityInstancesFunction
    : public AutofillPrivateExtensionFunction {
 public:
  AutofillPrivateLoadEntityInstancesFunction() = default;
  AutofillPrivateLoadEntityInstancesFunction(
      const AutofillPrivateLoadEntityInstancesFunction&) = delete;
  AutofillPrivateLoadEntityInstancesFunction& operator=(
      const AutofillPrivateLoadEntityInstancesFunction&) = delete;
  DECLARE_EXTENSION_FUNCTION("autofillPrivate.loadEntityInstances",
                             AUTOFILLPRIVATE_LOADENTITYINSTANCES)

 protected:
  ~AutofillPrivateLoadEntityInstancesFunction() override = default;

  // ExtensionFunction overrides.
  ResponseAction Run() override;
};

class AutofillPrivateGetEntityInstanceByGuidFunction
    : public AutofillPrivateExtensionFunction {
 public:
  AutofillPrivateGetEntityInstanceByGuidFunction() = default;
  AutofillPrivateGetEntityInstanceByGuidFunction(
      const AutofillPrivateGetEntityInstanceByGuidFunction&) = delete;
  AutofillPrivateGetEntityInstanceByGuidFunction& operator=(
      const AutofillPrivateGetEntityInstanceByGuidFunction&) = delete;
  DECLARE_EXTENSION_FUNCTION("autofillPrivate.getEntityInstanceByGuid",
                             AUTOFILLPRIVATE_GETENTITYINSTANCEBYGUID)

 protected:
  ~AutofillPrivateGetEntityInstanceByGuidFunction() override = default;

  // ExtensionFunction overrides.
  ResponseAction Run() override;
};

class AutofillPrivateGetAllEntityTypesFunction
    : public AutofillPrivateExtensionFunction {
 public:
  AutofillPrivateGetAllEntityTypesFunction() = default;
  AutofillPrivateGetAllEntityTypesFunction(
      const AutofillPrivateGetAllEntityTypesFunction&) = delete;
  AutofillPrivateGetAllEntityTypesFunction& operator=(
      const AutofillPrivateGetAllEntityTypesFunction&) = delete;
  DECLARE_EXTENSION_FUNCTION("autofillPrivate.getAllEntityTypes",
                             AUTOFILLPRIVATE_GETALLENTITYTYPES)

 protected:
  ~AutofillPrivateGetAllEntityTypesFunction() override = default;

  // ExtensionFunction overrides.
  ResponseAction Run() override;
};

class AutofillPrivateGetAllAttributeTypesForEntityTypeNameFunction
    : public AutofillPrivateExtensionFunction {
 public:
  AutofillPrivateGetAllAttributeTypesForEntityTypeNameFunction() = default;
  AutofillPrivateGetAllAttributeTypesForEntityTypeNameFunction(
      const AutofillPrivateGetAllAttributeTypesForEntityTypeNameFunction&) =
      delete;
  AutofillPrivateGetAllAttributeTypesForEntityTypeNameFunction& operator=(
      const AutofillPrivateGetAllAttributeTypesForEntityTypeNameFunction&) =
      delete;
  DECLARE_EXTENSION_FUNCTION(
      "autofillPrivate.getAllAttributeTypesForEntityTypeName",
      AUTOFILLPRIVATE_GETALLATTRIBUTETYPESFORENTITYTYPENAME)

 protected:
  ~AutofillPrivateGetAllAttributeTypesForEntityTypeNameFunction() override =
      default;

  // ExtensionFunction overrides.
  ResponseAction Run() override;
};

class AutofillPrivateGetAutofillAiOptInStatusFunction
    : public AutofillPrivateExtensionFunction {
 public:
  AutofillPrivateGetAutofillAiOptInStatusFunction() = default;
  AutofillPrivateGetAutofillAiOptInStatusFunction(
      const AutofillPrivateGetAutofillAiOptInStatusFunction&) = delete;
  AutofillPrivateGetAutofillAiOptInStatusFunction& operator=(
      const AutofillPrivateGetAutofillAiOptInStatusFunction&) = delete;
  DECLARE_EXTENSION_FUNCTION("autofillPrivate.getAutofillAiOptInStatus",
                             AUTOFILLPRIVATE_GETAUTOFILLAIOPTINSTATUS)

 protected:
  ~AutofillPrivateGetAutofillAiOptInStatusFunction() override = default;

  // ExtensionFunction overrides.
  ResponseAction Run() override;
};

class AutofillPrivateSetAutofillAiOptInStatusFunction
    : public AutofillPrivateExtensionFunction {
 public:
  AutofillPrivateSetAutofillAiOptInStatusFunction() = default;
  AutofillPrivateSetAutofillAiOptInStatusFunction(
      const AutofillPrivateSetAutofillAiOptInStatusFunction&) = delete;
  AutofillPrivateSetAutofillAiOptInStatusFunction& operator=(
      const AutofillPrivateSetAutofillAiOptInStatusFunction&) = delete;
  DECLARE_EXTENSION_FUNCTION("autofillPrivate.setAutofillAiOptInStatus",
                             AUTOFILLPRIVATE_SETAUTOFILLAIOPTINSTATUS)

 protected:
  ~AutofillPrivateSetAutofillAiOptInStatusFunction() override = default;

  // ExtensionFunction overrides.
  ResponseAction Run() override;
};

}  // namespace extensions

#endif  // CHROME_BROWSER_EXTENSIONS_API_AUTOFILL_PRIVATE_AUTOFILL_PRIVATE_API_H_