shell_trusted_vault_provider_fake.m 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. // Copyright 2021 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. #import "ios/web_view/shell/shell_trusted_vault_provider.h"
  5. #if !defined(__has_feature) || !__has_feature(objc_arc)
  6. #error "This file requires ARC support."
  7. #endif
  8. @implementation ShellTrustedVaultProvider
  9. - (instancetype)initWithAuthService:(ShellAuthService*)authService {
  10. return [super init];
  11. }
  12. - (void)showFetchKeysFlowForIdentity:(CWVIdentity*)identity
  13. fromViewController:(UIViewController*)viewController {
  14. // No op.
  15. }
  16. - (void)showFixDegradedRecoverabilityFlowForIdentity:(CWVIdentity*)identity
  17. fromViewController:
  18. (UIViewController*)viewController {
  19. // No op.
  20. }
  21. #pragma mark - CWVTrustedVaultProvider
  22. - (void)addTrustedVaultObserver:(CWVTrustedVaultObserver*)observer {
  23. // No op.
  24. }
  25. - (void)removeTrustedVaultObserver:(CWVTrustedVaultObserver*)observer {
  26. // No op.
  27. }
  28. - (void)fetchKeysForIdentity:(CWVIdentity*)identity
  29. completion:(void (^)(NSArray<NSData*>* _Nullable,
  30. NSError* _Nullable))completion {
  31. NSError* error = [NSError errorWithDomain:@"org.chromium.ios-web-view-shell"
  32. code:-1
  33. userInfo:nil];
  34. completion(nil, error);
  35. }
  36. - (void)markLocalKeysAsStaleForIdentity:(CWVIdentity*)identity
  37. completion:
  38. (void (^)(NSError* _Nullable))completion {
  39. NSError* error = [NSError errorWithDomain:@"org.chromium.ios-web-view-shell"
  40. code:-1
  41. userInfo:nil];
  42. completion(error);
  43. }
  44. - (void)isRecoverabilityDegradedForIdentity:(CWVIdentity*)identity
  45. completion:(void (^)(BOOL, NSError* _Nullable))
  46. completion {
  47. NSError* error = [NSError errorWithDomain:@"org.chromium.ios-web-view-shell"
  48. code:-1
  49. userInfo:nil];
  50. completion(NO, error);
  51. }
  52. @end