Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(974)

Side by Side Diff: chrome/browser/extensions/api/easy_unlock_private/easy_unlock_private_api.h

Issue 2285573002: [Extensions] Convert some SyncExtensionFunctions (Closed)
Patch Set: fix Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_EXTENSIONS_API_EASY_UNLOCK_PRIVATE_EASY_UNLOCK_PRIVATE_AP I_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_EASY_UNLOCK_PRIVATE_EASY_UNLOCK_PRIVATE_AP I_H_
6 #define CHROME_BROWSER_EXTENSIONS_API_EASY_UNLOCK_PRIVATE_EASY_UNLOCK_PRIVATE_AP I_H_ 6 #define CHROME_BROWSER_EXTENSIONS_API_EASY_UNLOCK_PRIVATE_EASY_UNLOCK_PRIVATE_AP I_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 67
68 std::unique_ptr<EasyUnlockPrivateCryptoDelegate> crypto_delegate_; 68 std::unique_ptr<EasyUnlockPrivateCryptoDelegate> crypto_delegate_;
69 69
70 std::unique_ptr<EasyUnlockPrivateConnectionManager> connection_manager_; 70 std::unique_ptr<EasyUnlockPrivateConnectionManager> connection_manager_;
71 71
72 DISALLOW_COPY_AND_ASSIGN(EasyUnlockPrivateAPI); 72 DISALLOW_COPY_AND_ASSIGN(EasyUnlockPrivateAPI);
73 }; 73 };
74 74
75 // TODO(tbarzic): Replace SyncExtensionFunction/AsyncExtensionFunction overrides 75 // TODO(tbarzic): Replace SyncExtensionFunction/AsyncExtensionFunction overrides
76 // with UIThreadExtensionFunction throughout the file. 76 // with UIThreadExtensionFunction throughout the file.
77 class EasyUnlockPrivateGetStringsFunction : public SyncExtensionFunction { 77 class EasyUnlockPrivateGetStringsFunction : public UIThreadExtensionFunction {
78 public: 78 public:
79 EasyUnlockPrivateGetStringsFunction(); 79 EasyUnlockPrivateGetStringsFunction();
80 80
81 protected: 81 protected:
82 ~EasyUnlockPrivateGetStringsFunction() override; 82 ~EasyUnlockPrivateGetStringsFunction() override;
83 83
84 // SyncExtensionFunction: 84 // ExtensionFunction:
85 bool RunSync() override; 85 ResponseAction Run() override;
86 86
87 private: 87 private:
88 DECLARE_EXTENSION_FUNCTION("easyUnlockPrivate.getStrings", 88 DECLARE_EXTENSION_FUNCTION("easyUnlockPrivate.getStrings",
89 EASYUNLOCKPRIVATE_GETSTRINGS) 89 EASYUNLOCKPRIVATE_GETSTRINGS)
90 90
91 DISALLOW_COPY_AND_ASSIGN(EasyUnlockPrivateGetStringsFunction); 91 DISALLOW_COPY_AND_ASSIGN(EasyUnlockPrivateGetStringsFunction);
92 }; 92 };
93 93
94 class EasyUnlockPrivatePerformECDHKeyAgreementFunction 94 class EasyUnlockPrivatePerformECDHKeyAgreementFunction
95 : public AsyncExtensionFunction { 95 : public AsyncExtensionFunction {
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 202
203 // BluetoothSocketAbstractConnectFunction: 203 // BluetoothSocketAbstractConnectFunction:
204 void ConnectToService(device::BluetoothDevice* device, 204 void ConnectToService(device::BluetoothDevice* device,
205 const device::BluetoothUUID& uuid) override; 205 const device::BluetoothUUID& uuid) override;
206 206
207 DISALLOW_COPY_AND_ASSIGN( 207 DISALLOW_COPY_AND_ASSIGN(
208 EasyUnlockPrivateConnectToBluetoothServiceInsecurelyFunction); 208 EasyUnlockPrivateConnectToBluetoothServiceInsecurelyFunction);
209 }; 209 };
210 210
211 class EasyUnlockPrivateUpdateScreenlockStateFunction 211 class EasyUnlockPrivateUpdateScreenlockStateFunction
212 : public SyncExtensionFunction { 212 : public UIThreadExtensionFunction {
213 public: 213 public:
214 EasyUnlockPrivateUpdateScreenlockStateFunction(); 214 EasyUnlockPrivateUpdateScreenlockStateFunction();
215 215
216 protected: 216 protected:
217 ~EasyUnlockPrivateUpdateScreenlockStateFunction() override; 217 ~EasyUnlockPrivateUpdateScreenlockStateFunction() override;
218 218
219 bool RunSync() override; 219 ResponseAction Run() override;
220 220
221 private: 221 private:
222 DECLARE_EXTENSION_FUNCTION("easyUnlockPrivate.updateScreenlockState", 222 DECLARE_EXTENSION_FUNCTION("easyUnlockPrivate.updateScreenlockState",
223 EASYUNLOCKPRIVATE_UPDATESCREENLOCKSTATE) 223 EASYUNLOCKPRIVATE_UPDATESCREENLOCKSTATE)
224 224
225 DISALLOW_COPY_AND_ASSIGN(EasyUnlockPrivateUpdateScreenlockStateFunction); 225 DISALLOW_COPY_AND_ASSIGN(EasyUnlockPrivateUpdateScreenlockStateFunction);
226 }; 226 };
227 227
228 class EasyUnlockPrivateSetPermitAccessFunction : public SyncExtensionFunction { 228 class EasyUnlockPrivateSetPermitAccessFunction
229 : public UIThreadExtensionFunction {
229 public: 230 public:
230 DECLARE_EXTENSION_FUNCTION("easyUnlockPrivate.setPermitAccess", 231 DECLARE_EXTENSION_FUNCTION("easyUnlockPrivate.setPermitAccess",
231 EASYUNLOCKPRIVATE_SETPERMITACCESS) 232 EASYUNLOCKPRIVATE_SETPERMITACCESS)
232 EasyUnlockPrivateSetPermitAccessFunction(); 233 EasyUnlockPrivateSetPermitAccessFunction();
233 234
234 private: 235 private:
235 ~EasyUnlockPrivateSetPermitAccessFunction() override; 236 ~EasyUnlockPrivateSetPermitAccessFunction() override;
236 237
237 // SyncExtensionFunction: 238 // ExtensionFunction:
238 bool RunSync() override; 239 ResponseAction Run() override;
239 240
240 DISALLOW_COPY_AND_ASSIGN(EasyUnlockPrivateSetPermitAccessFunction); 241 DISALLOW_COPY_AND_ASSIGN(EasyUnlockPrivateSetPermitAccessFunction);
241 }; 242 };
242 243
243 class EasyUnlockPrivateGetPermitAccessFunction : public SyncExtensionFunction { 244 class EasyUnlockPrivateGetPermitAccessFunction
245 : public UIThreadExtensionFunction {
244 public: 246 public:
245 DECLARE_EXTENSION_FUNCTION("easyUnlockPrivate.getPermitAccess", 247 DECLARE_EXTENSION_FUNCTION("easyUnlockPrivate.getPermitAccess",
246 EASYUNLOCKPRIVATE_GETPERMITACCESS) 248 EASYUNLOCKPRIVATE_GETPERMITACCESS)
247 EasyUnlockPrivateGetPermitAccessFunction(); 249 EasyUnlockPrivateGetPermitAccessFunction();
248 250
249 protected: 251 protected:
250 ~EasyUnlockPrivateGetPermitAccessFunction() override; 252 ~EasyUnlockPrivateGetPermitAccessFunction() override;
251 253
252 // Writes the user's public and private key in base64 form to the 254 // Writes the user's public and private key in base64 form to the
253 // |user_public_key| and |user_private_key| fields. Exposed for testing. 255 // |user_public_key| and |user_private_key| fields. Exposed for testing.
254 virtual void GetKeyPairForExperiment(std::string* user_public_key, 256 virtual void GetKeyPairForExperiment(std::string* user_public_key,
255 std::string* user_private_key); 257 std::string* user_private_key);
256 258
257 private: 259 private:
258 // SyncExtensionFunction: 260 // ExtensionFunction:
259 bool RunSync() override; 261 ResponseAction Run() override;
260 262
261 // Instead of returning the value set by easyUnlockPrivate.setPermitAccess, 263 // Instead of returning the value set by easyUnlockPrivate.setPermitAccess,
262 // return the permit access used by the native CryptAuthEnrollmentManager. 264 // return the permit access used by the native CryptAuthEnrollmentManager.
263 void ReturnPermitAccessForExperiment(); 265 ResponseAction GetPermitAccessForExperiment();
264 266
265 DISALLOW_COPY_AND_ASSIGN(EasyUnlockPrivateGetPermitAccessFunction); 267 DISALLOW_COPY_AND_ASSIGN(EasyUnlockPrivateGetPermitAccessFunction);
266 }; 268 };
267 269
268 class EasyUnlockPrivateClearPermitAccessFunction 270 class EasyUnlockPrivateClearPermitAccessFunction
269 : public SyncExtensionFunction { 271 : public UIThreadExtensionFunction {
270 public: 272 public:
271 DECLARE_EXTENSION_FUNCTION("easyUnlockPrivate.clearPermitAccess", 273 DECLARE_EXTENSION_FUNCTION("easyUnlockPrivate.clearPermitAccess",
272 EASYUNLOCKPRIVATE_CLEARPERMITACCESS) 274 EASYUNLOCKPRIVATE_CLEARPERMITACCESS)
273 EasyUnlockPrivateClearPermitAccessFunction(); 275 EasyUnlockPrivateClearPermitAccessFunction();
274 276
275 private: 277 private:
276 ~EasyUnlockPrivateClearPermitAccessFunction() override; 278 ~EasyUnlockPrivateClearPermitAccessFunction() override;
277 279
278 // SyncExtensionFunction: 280 // ExtensionFunction:
279 bool RunSync() override; 281 ResponseAction Run() override;
280 282
281 DISALLOW_COPY_AND_ASSIGN(EasyUnlockPrivateClearPermitAccessFunction); 283 DISALLOW_COPY_AND_ASSIGN(EasyUnlockPrivateClearPermitAccessFunction);
282 }; 284 };
283 285
284 class EasyUnlockPrivateSetRemoteDevicesFunction : public SyncExtensionFunction { 286 class EasyUnlockPrivateSetRemoteDevicesFunction
287 : public UIThreadExtensionFunction {
285 public: 288 public:
286 DECLARE_EXTENSION_FUNCTION("easyUnlockPrivate.setRemoteDevices", 289 DECLARE_EXTENSION_FUNCTION("easyUnlockPrivate.setRemoteDevices",
287 EASYUNLOCKPRIVATE_SETREMOTEDEVICES) 290 EASYUNLOCKPRIVATE_SETREMOTEDEVICES)
288 EasyUnlockPrivateSetRemoteDevicesFunction(); 291 EasyUnlockPrivateSetRemoteDevicesFunction();
289 292
290 private: 293 private:
291 ~EasyUnlockPrivateSetRemoteDevicesFunction() override; 294 ~EasyUnlockPrivateSetRemoteDevicesFunction() override;
292 295
293 // SyncExtensionFunction: 296 // ExtensionFunction:
294 bool RunSync() override; 297 ResponseAction Run() override;
295 298
296 DISALLOW_COPY_AND_ASSIGN(EasyUnlockPrivateSetRemoteDevicesFunction); 299 DISALLOW_COPY_AND_ASSIGN(EasyUnlockPrivateSetRemoteDevicesFunction);
297 }; 300 };
298 301
299 class EasyUnlockPrivateGetRemoteDevicesFunction 302 class EasyUnlockPrivateGetRemoteDevicesFunction
300 : public AsyncExtensionFunction { 303 : public AsyncExtensionFunction {
301 public: 304 public:
302 DECLARE_EXTENSION_FUNCTION("easyUnlockPrivate.getRemoteDevices", 305 DECLARE_EXTENSION_FUNCTION("easyUnlockPrivate.getRemoteDevices",
303 EASYUNLOCKPRIVATE_GETREMOTEDEVICES) 306 EASYUNLOCKPRIVATE_GETREMOTEDEVICES)
304 EasyUnlockPrivateGetRemoteDevicesFunction(); 307 EasyUnlockPrivateGetRemoteDevicesFunction();
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
354 357
355 // AsyncExtensionFunction: 358 // AsyncExtensionFunction:
356 bool RunAsync() override; 359 bool RunAsync() override;
357 360
358 // Called when the challenge and the signed nonce have been generated. 361 // Called when the challenge and the signed nonce have been generated.
359 void OnDone(const std::string& challenge, const std::string& signed_nonce); 362 void OnDone(const std::string& challenge, const std::string& signed_nonce);
360 363
361 DISALLOW_COPY_AND_ASSIGN(EasyUnlockPrivateGetSignInChallengeFunction); 364 DISALLOW_COPY_AND_ASSIGN(EasyUnlockPrivateGetSignInChallengeFunction);
362 }; 365 };
363 366
364 class EasyUnlockPrivateTrySignInSecretFunction : 367 class EasyUnlockPrivateTrySignInSecretFunction
365 public SyncExtensionFunction { 368 : public UIThreadExtensionFunction {
366 public: 369 public:
367 DECLARE_EXTENSION_FUNCTION("easyUnlockPrivate.trySignInSecret", 370 DECLARE_EXTENSION_FUNCTION("easyUnlockPrivate.trySignInSecret",
368 EASYUNLOCKPRIVATE_TRYSIGNINSECRET) 371 EASYUNLOCKPRIVATE_TRYSIGNINSECRET)
369 EasyUnlockPrivateTrySignInSecretFunction(); 372 EasyUnlockPrivateTrySignInSecretFunction();
370 373
371 private: 374 private:
372 ~EasyUnlockPrivateTrySignInSecretFunction() override; 375 ~EasyUnlockPrivateTrySignInSecretFunction() override;
373 376
374 // SyncExtensionFunction: 377 // ExtensionFunction:
375 bool RunSync() override; 378 ResponseAction Run() override;
376 379
377 DISALLOW_COPY_AND_ASSIGN(EasyUnlockPrivateTrySignInSecretFunction); 380 DISALLOW_COPY_AND_ASSIGN(EasyUnlockPrivateTrySignInSecretFunction);
378 }; 381 };
379 382
380 class EasyUnlockPrivateGetUserInfoFunction : public SyncExtensionFunction { 383 class EasyUnlockPrivateGetUserInfoFunction : public UIThreadExtensionFunction {
381 public: 384 public:
382 DECLARE_EXTENSION_FUNCTION("easyUnlockPrivate.getUserInfo", 385 DECLARE_EXTENSION_FUNCTION("easyUnlockPrivate.getUserInfo",
383 EASYUNLOCKPRIVATE_GETUSERINFO) 386 EASYUNLOCKPRIVATE_GETUSERINFO)
384 EasyUnlockPrivateGetUserInfoFunction(); 387 EasyUnlockPrivateGetUserInfoFunction();
385 388
386 private: 389 private:
387 ~EasyUnlockPrivateGetUserInfoFunction() override; 390 ~EasyUnlockPrivateGetUserInfoFunction() override;
388 391
389 // SyncExtensionFunction: 392 // ExtensionFunction:
390 bool RunSync() override; 393 ResponseAction Run() override;
391 394
392 DISALLOW_COPY_AND_ASSIGN(EasyUnlockPrivateGetUserInfoFunction); 395 DISALLOW_COPY_AND_ASSIGN(EasyUnlockPrivateGetUserInfoFunction);
393 }; 396 };
394 397
395 class EasyUnlockPrivateGetConnectionInfoFunction 398 class EasyUnlockPrivateGetConnectionInfoFunction
396 : public api::BluetoothExtensionFunction { 399 : public api::BluetoothExtensionFunction {
397 public: 400 public:
398 DECLARE_EXTENSION_FUNCTION("easyUnlockPrivate.getConnectionInfo", 401 DECLARE_EXTENSION_FUNCTION("easyUnlockPrivate.getConnectionInfo",
399 EASYUNLOCKPRIVATE_GETCONNECTIONINFO) 402 EASYUNLOCKPRIVATE_GETCONNECTIONINFO)
400 EasyUnlockPrivateGetConnectionInfoFunction(); 403 EasyUnlockPrivateGetConnectionInfoFunction();
401 404
402 private: 405 private:
403 ~EasyUnlockPrivateGetConnectionInfoFunction() override; 406 ~EasyUnlockPrivateGetConnectionInfoFunction() override;
404 407
405 // BluetoothExtensionFunction: 408 // BluetoothExtensionFunction:
406 bool DoWork(scoped_refptr<device::BluetoothAdapter> adapter) override; 409 bool DoWork(scoped_refptr<device::BluetoothAdapter> adapter) override;
407 410
408 void OnConnectionInfo( 411 void OnConnectionInfo(
409 const device::BluetoothDevice::ConnectionInfo& connection_info); 412 const device::BluetoothDevice::ConnectionInfo& connection_info);
410 413
411 DISALLOW_COPY_AND_ASSIGN(EasyUnlockPrivateGetConnectionInfoFunction); 414 DISALLOW_COPY_AND_ASSIGN(EasyUnlockPrivateGetConnectionInfoFunction);
412 }; 415 };
413 416
414 class EasyUnlockPrivateShowErrorBubbleFunction : public SyncExtensionFunction { 417 class EasyUnlockPrivateShowErrorBubbleFunction
418 : public UIThreadExtensionFunction {
415 public: 419 public:
416 DECLARE_EXTENSION_FUNCTION("easyUnlockPrivate.showErrorBubble", 420 DECLARE_EXTENSION_FUNCTION("easyUnlockPrivate.showErrorBubble",
417 EASYUNLOCKPRIVATE_SHOWERRORBUBBLE) 421 EASYUNLOCKPRIVATE_SHOWERRORBUBBLE)
418 EasyUnlockPrivateShowErrorBubbleFunction(); 422 EasyUnlockPrivateShowErrorBubbleFunction();
419 423
420 private: 424 private:
421 ~EasyUnlockPrivateShowErrorBubbleFunction() override; 425 ~EasyUnlockPrivateShowErrorBubbleFunction() override;
422 426
423 // SyncExtensionFunction: 427 // ExtensionFunction:
424 bool RunSync() override; 428 ResponseAction Run() override;
425 429
426 DISALLOW_COPY_AND_ASSIGN(EasyUnlockPrivateShowErrorBubbleFunction); 430 DISALLOW_COPY_AND_ASSIGN(EasyUnlockPrivateShowErrorBubbleFunction);
427 }; 431 };
428 432
429 class EasyUnlockPrivateHideErrorBubbleFunction : public SyncExtensionFunction { 433 class EasyUnlockPrivateHideErrorBubbleFunction
434 : public UIThreadExtensionFunction {
430 public: 435 public:
431 DECLARE_EXTENSION_FUNCTION("easyUnlockPrivate.hideErrorBubble", 436 DECLARE_EXTENSION_FUNCTION("easyUnlockPrivate.hideErrorBubble",
432 EASYUNLOCKPRIVATE_HIDEERRORBUBBLE) 437 EASYUNLOCKPRIVATE_HIDEERRORBUBBLE)
433 EasyUnlockPrivateHideErrorBubbleFunction(); 438 EasyUnlockPrivateHideErrorBubbleFunction();
434 439
435 private: 440 private:
436 ~EasyUnlockPrivateHideErrorBubbleFunction() override; 441 ~EasyUnlockPrivateHideErrorBubbleFunction() override;
437 442
438 // SyncExtensionFunction: 443 // ExtensionFunction:
439 bool RunSync() override; 444 ResponseAction Run() override;
440 445
441 DISALLOW_COPY_AND_ASSIGN(EasyUnlockPrivateHideErrorBubbleFunction); 446 DISALLOW_COPY_AND_ASSIGN(EasyUnlockPrivateHideErrorBubbleFunction);
442 }; 447 };
443 448
444 class EasyUnlockPrivateSetAutoPairingResultFunction 449 class EasyUnlockPrivateSetAutoPairingResultFunction
445 : public SyncExtensionFunction { 450 : public UIThreadExtensionFunction {
446 public: 451 public:
447 DECLARE_EXTENSION_FUNCTION("easyUnlockPrivate.setAutoPairingResult", 452 DECLARE_EXTENSION_FUNCTION("easyUnlockPrivate.setAutoPairingResult",
448 EASYUNLOCKPRIVATE_SETAUTOPAIRINGRESULT) 453 EASYUNLOCKPRIVATE_SETAUTOPAIRINGRESULT)
449 EasyUnlockPrivateSetAutoPairingResultFunction(); 454 EasyUnlockPrivateSetAutoPairingResultFunction();
450 455
451 private: 456 private:
452 ~EasyUnlockPrivateSetAutoPairingResultFunction() override; 457 ~EasyUnlockPrivateSetAutoPairingResultFunction() override;
453 458
454 // SyncExtensionFunction: 459 // ExtensionFunction:
455 bool RunSync() override; 460 ResponseAction Run() override;
456 461
457 DISALLOW_COPY_AND_ASSIGN(EasyUnlockPrivateSetAutoPairingResultFunction); 462 DISALLOW_COPY_AND_ASSIGN(EasyUnlockPrivateSetAutoPairingResultFunction);
458 }; 463 };
459 464
460 class EasyUnlockPrivateFindSetupConnectionFunction 465 class EasyUnlockPrivateFindSetupConnectionFunction
461 : public AsyncExtensionFunction { 466 : public AsyncExtensionFunction {
462 public: 467 public:
463 DECLARE_EXTENSION_FUNCTION("easyUnlockPrivate.findSetupConnection", 468 DECLARE_EXTENSION_FUNCTION("easyUnlockPrivate.findSetupConnection",
464 EASYUNLOCKPRIVATE_FINDSETUPCONNECTION) 469 EASYUNLOCKPRIVATE_FINDSETUPCONNECTION)
465 EasyUnlockPrivateFindSetupConnectionFunction(); 470 EasyUnlockPrivateFindSetupConnectionFunction();
(...skipping 19 matching lines...) Expand all
485 // The connection throttler passed to the BLE connection finder. 490 // The connection throttler passed to the BLE connection finder.
486 std::unique_ptr<proximity_auth::BluetoothThrottler> bluetooth_throttler_; 491 std::unique_ptr<proximity_auth::BluetoothThrottler> bluetooth_throttler_;
487 492
488 // Used for timing out when waiting for the connection finder to return. 493 // Used for timing out when waiting for the connection finder to return.
489 std::unique_ptr<base::Timer> timer_; 494 std::unique_ptr<base::Timer> timer_;
490 495
491 DISALLOW_COPY_AND_ASSIGN(EasyUnlockPrivateFindSetupConnectionFunction); 496 DISALLOW_COPY_AND_ASSIGN(EasyUnlockPrivateFindSetupConnectionFunction);
492 }; 497 };
493 498
494 class EasyUnlockPrivateSetupConnectionStatusFunction 499 class EasyUnlockPrivateSetupConnectionStatusFunction
495 : public SyncExtensionFunction { 500 : public UIThreadExtensionFunction {
496 public: 501 public:
497 DECLARE_EXTENSION_FUNCTION("easyUnlockPrivate.setupConnectionStatus", 502 DECLARE_EXTENSION_FUNCTION("easyUnlockPrivate.setupConnectionStatus",
498 EASYUNLOCKPRIVATE_SETUPCONNECTIONSTATUS) 503 EASYUNLOCKPRIVATE_SETUPCONNECTIONSTATUS)
499 EasyUnlockPrivateSetupConnectionStatusFunction(); 504 EasyUnlockPrivateSetupConnectionStatusFunction();
500 505
501 private: 506 private:
502 ~EasyUnlockPrivateSetupConnectionStatusFunction() override; 507 ~EasyUnlockPrivateSetupConnectionStatusFunction() override;
503 508
504 // SyncExtensionFunction: 509 // ExtensionFunction:
505 bool RunSync() override; 510 ResponseAction Run() override;
506 511
507 DISALLOW_COPY_AND_ASSIGN(EasyUnlockPrivateSetupConnectionStatusFunction); 512 DISALLOW_COPY_AND_ASSIGN(EasyUnlockPrivateSetupConnectionStatusFunction);
508 }; 513 };
509 514
510 class EasyUnlockPrivateSetupConnectionDisconnectFunction 515 class EasyUnlockPrivateSetupConnectionDisconnectFunction
511 : public SyncExtensionFunction { 516 : public UIThreadExtensionFunction {
512 public: 517 public:
513 DECLARE_EXTENSION_FUNCTION("easyUnlockPrivate.setupConnectionDisconnect", 518 DECLARE_EXTENSION_FUNCTION("easyUnlockPrivate.setupConnectionDisconnect",
514 EASYUNLOCKPRIVATE_SETUPCONNECTIONDISCONNECT) 519 EASYUNLOCKPRIVATE_SETUPCONNECTIONDISCONNECT)
515 EasyUnlockPrivateSetupConnectionDisconnectFunction(); 520 EasyUnlockPrivateSetupConnectionDisconnectFunction();
516 521
517 private: 522 private:
518 ~EasyUnlockPrivateSetupConnectionDisconnectFunction() override; 523 ~EasyUnlockPrivateSetupConnectionDisconnectFunction() override;
519 524
520 // SyncExtensionFunction: 525 // ExtensionFunction:
521 bool RunSync() override; 526 ResponseAction Run() override;
522 527
523 DISALLOW_COPY_AND_ASSIGN(EasyUnlockPrivateSetupConnectionDisconnectFunction); 528 DISALLOW_COPY_AND_ASSIGN(EasyUnlockPrivateSetupConnectionDisconnectFunction);
524 }; 529 };
525 530
526 class EasyUnlockPrivateSetupConnectionSendFunction 531 class EasyUnlockPrivateSetupConnectionSendFunction
527 : public SyncExtensionFunction { 532 : public UIThreadExtensionFunction {
528 public: 533 public:
529 DECLARE_EXTENSION_FUNCTION("easyUnlockPrivate.setupConnectionSend", 534 DECLARE_EXTENSION_FUNCTION("easyUnlockPrivate.setupConnectionSend",
530 EASYUNLOCKPRIVATE_SETUPCONNECTIONSEND) 535 EASYUNLOCKPRIVATE_SETUPCONNECTIONSEND)
531 EasyUnlockPrivateSetupConnectionSendFunction(); 536 EasyUnlockPrivateSetupConnectionSendFunction();
532 537
533 private: 538 private:
534 ~EasyUnlockPrivateSetupConnectionSendFunction() override; 539 ~EasyUnlockPrivateSetupConnectionSendFunction() override;
535 540
536 // SyncExtensionFunction: 541 // ExtensionFunction:
537 bool RunSync() override; 542 ResponseAction Run() override;
538 543
539 DISALLOW_COPY_AND_ASSIGN(EasyUnlockPrivateSetupConnectionSendFunction); 544 DISALLOW_COPY_AND_ASSIGN(EasyUnlockPrivateSetupConnectionSendFunction);
540 }; 545 };
541 546
542 class EasyUnlockPrivateSetupConnectionGetDeviceAddressFunction 547 class EasyUnlockPrivateSetupConnectionGetDeviceAddressFunction
543 : public SyncExtensionFunction { 548 : public UIThreadExtensionFunction {
544 public: 549 public:
545 DECLARE_EXTENSION_FUNCTION( 550 DECLARE_EXTENSION_FUNCTION(
546 "easyUnlockPrivate.setupConnectionGetDeviceAddress", 551 "easyUnlockPrivate.setupConnectionGetDeviceAddress",
547 EASYUNLOCKPRIVATE_SETUPCONNECTIONGETDEVICEADDRESS) 552 EASYUNLOCKPRIVATE_SETUPCONNECTIONGETDEVICEADDRESS)
548 EasyUnlockPrivateSetupConnectionGetDeviceAddressFunction(); 553 EasyUnlockPrivateSetupConnectionGetDeviceAddressFunction();
549 554
550 private: 555 private:
551 ~EasyUnlockPrivateSetupConnectionGetDeviceAddressFunction() override; 556 ~EasyUnlockPrivateSetupConnectionGetDeviceAddressFunction() override;
552 557
553 // SyncExtensionFunction: 558 // ExtensionFunction:
554 bool RunSync() override; 559 ResponseAction Run() override;
555 560
556 DISALLOW_COPY_AND_ASSIGN( 561 DISALLOW_COPY_AND_ASSIGN(
557 EasyUnlockPrivateSetupConnectionGetDeviceAddressFunction); 562 EasyUnlockPrivateSetupConnectionGetDeviceAddressFunction);
558 }; 563 };
559 564
560 } // namespace extensions 565 } // namespace extensions
561 566
562 #endif // CHROME_BROWSER_EXTENSIONS_API_EASY_UNLOCK_PRIVATE_EASY_UNLOCK_PRIVATE _API_H_ 567 #endif // CHROME_BROWSER_EXTENSIONS_API_EASY_UNLOCK_PRIVATE_EASY_UNLOCK_PRIVATE _API_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698