Commit 678cfae7 authored by John Z Wu's avatar John Z Wu Committed by Commit Bot

Prefix block typedefs in CWVAutofillDataManager.

Cq-Include-Trybots: luci.chromium.try:ios-simulator-full-configs;master.tryserver.chromium.mac:ios-simulator-cronet
Change-Id: Idefc9a0dac8437e651843c4b1d3abc20ccee4e2d
Reviewed-on: https://chromium-review.googlesource.com/1069932Reviewed-by: default avatarHiroshi Ichikawa <ichikawa@chromium.org>
Commit-Queue: John Wu <jzw@chromium.org>
Cr-Commit-Position: refs/heads/master@{#560935}
parent 016d87f0
...@@ -60,9 +60,9 @@ class WebViewPersonalDataManagerObserverBridge ...@@ -60,9 +60,9 @@ class WebViewPersonalDataManagerObserverBridge
_personalDataManagerObserverBridge; _personalDataManagerObserverBridge;
// These completion handlers are stored so they can be called later on when // These completion handlers are stored so they can be called later on when
// |_personalDataManager| completes its initial loading. // |_personalDataManager| completes its initial loading.
NSMutableArray<FetchProfilesCompletionHandler>* NSMutableArray<CWVFetchProfilesCompletionHandler>*
_fetchProfilesCompletionHandlers; _fetchProfilesCompletionHandlers;
NSMutableArray<FetchCreditCardsCompletionHandler>* NSMutableArray<CWVFetchCreditCardsCompletionHandler>*
_fetchCreditCardsCompletionHandlers; _fetchCreditCardsCompletionHandlers;
} }
...@@ -90,7 +90,7 @@ class WebViewPersonalDataManagerObserverBridge ...@@ -90,7 +90,7 @@ class WebViewPersonalDataManagerObserverBridge
#pragma mark - Public Methods #pragma mark - Public Methods
- (void)fetchProfilesWithCompletionHandler: - (void)fetchProfilesWithCompletionHandler:
(FetchProfilesCompletionHandler)completionHandler { (CWVFetchProfilesCompletionHandler)completionHandler {
// If data is already loaded, return the existing data asynchronously to match // If data is already loaded, return the existing data asynchronously to match
// client expectation. Otherwise, save the |completionHandler| and wait for // client expectation. Otherwise, save the |completionHandler| and wait for
// |personalDataDidChange| to be invoked. // |personalDataDidChange| to be invoked.
...@@ -114,7 +114,7 @@ class WebViewPersonalDataManagerObserverBridge ...@@ -114,7 +114,7 @@ class WebViewPersonalDataManagerObserverBridge
} }
- (void)fetchCreditCardsWithCompletionHandler: - (void)fetchCreditCardsWithCompletionHandler:
(FetchCreditCardsCompletionHandler)completionHandler { (CWVFetchCreditCardsCompletionHandler)completionHandler {
// If data is already loaded, return the existing data asynchronously to match // If data is already loaded, return the existing data asynchronously to match
// client expectation. Otherwise, save the |completionHandler| and wait for // client expectation. Otherwise, save the |completionHandler| and wait for
// |personalDataDidChange| to be invoked. // |personalDataDidChange| to be invoked.
...@@ -144,7 +144,7 @@ class WebViewPersonalDataManagerObserverBridge ...@@ -144,7 +144,7 @@ class WebViewPersonalDataManagerObserverBridge
if (_personalDataManager->IsDataLoaded()) { if (_personalDataManager->IsDataLoaded()) {
if (_fetchProfilesCompletionHandlers.count > 0) { if (_fetchProfilesCompletionHandlers.count > 0) {
NSArray<CWVAutofillProfile*>* profiles = [self profiles]; NSArray<CWVAutofillProfile*>* profiles = [self profiles];
for (FetchProfilesCompletionHandler completionHandler in for (CWVFetchProfilesCompletionHandler completionHandler in
_fetchProfilesCompletionHandlers) { _fetchProfilesCompletionHandlers) {
completionHandler(profiles); completionHandler(profiles);
} }
...@@ -152,7 +152,7 @@ class WebViewPersonalDataManagerObserverBridge ...@@ -152,7 +152,7 @@ class WebViewPersonalDataManagerObserverBridge
} }
if (_fetchCreditCardsCompletionHandlers.count > 0) { if (_fetchCreditCardsCompletionHandlers.count > 0) {
NSArray<CWVCreditCard*>* creditCards = [self creditCards]; NSArray<CWVCreditCard*>* creditCards = [self creditCards];
for (FetchCreditCardsCompletionHandler completionHandler in for (CWVFetchCreditCardsCompletionHandler completionHandler in
_fetchCreditCardsCompletionHandlers) { _fetchCreditCardsCompletionHandlers) {
completionHandler(creditCards); completionHandler(creditCards);
} }
......
...@@ -16,9 +16,10 @@ NS_ASSUME_NONNULL_BEGIN ...@@ -16,9 +16,10 @@ NS_ASSUME_NONNULL_BEGIN
@protocol CWVAutofillDataManagerDelegate; @protocol CWVAutofillDataManagerDelegate;
// Used in |completionHandler| in |fetchProfilesWithCompletionHandler:| // Used in |completionHandler| in |fetchProfilesWithCompletionHandler:|
typedef void (^FetchProfilesCompletionHandler)(NSArray<CWVAutofillProfile*>*); typedef void (^CWVFetchProfilesCompletionHandler)(
NSArray<CWVAutofillProfile*>*);
// Used in |completionHandler| in |fetchCreditCardsWithCompletionHandler:| // Used in |completionHandler| in |fetchCreditCardsWithCompletionHandler:|
typedef void (^FetchCreditCardsCompletionHandler)(NSArray<CWVCreditCard*>*); typedef void (^CWVFetchCreditCardsCompletionHandler)(NSArray<CWVCreditCard*>*);
CWV_EXPORT CWV_EXPORT
// Exposes saved autofill data such as address profiles and credit cards. // Exposes saved autofill data such as address profiles and credit cards.
...@@ -31,7 +32,7 @@ CWV_EXPORT ...@@ -31,7 +32,7 @@ CWV_EXPORT
// Returns all saved profiles for address autofill in |completionHandler|. // Returns all saved profiles for address autofill in |completionHandler|.
- (void)fetchProfilesWithCompletionHandler: - (void)fetchProfilesWithCompletionHandler:
(FetchProfilesCompletionHandler)completionHandler; (CWVFetchProfilesCompletionHandler)completionHandler;
// Updates the profile. // Updates the profile.
- (void)updateProfile:(CWVAutofillProfile*)profile; - (void)updateProfile:(CWVAutofillProfile*)profile;
...@@ -41,7 +42,7 @@ CWV_EXPORT ...@@ -41,7 +42,7 @@ CWV_EXPORT
// Returns all saved credit cards for payment autofill in |completionHandler|. // Returns all saved credit cards for payment autofill in |completionHandler|.
- (void)fetchCreditCardsWithCompletionHandler: - (void)fetchCreditCardsWithCompletionHandler:
(FetchCreditCardsCompletionHandler)completionHandler; (CWVFetchCreditCardsCompletionHandler)completionHandler;
// Updates the card. // Updates the card.
- (void)updateCreditCard:(CWVCreditCard*)creditCard; - (void)updateCreditCard:(CWVCreditCard*)creditCard;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment