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

Side by Side Diff: ios/chrome/browser/payments/payment_request_coordinator.mm

Issue 2610923005: Replace ObjCPropertyReleaser with ReleaseProperties() project-wide. (Closed)
Patch Set: Yank unrelated changes. Created 3 years, 10 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 #import "ios/chrome/browser/payments/payment_request_coordinator.h" 5 #import "ios/chrome/browser/payments/payment_request_coordinator.h"
6 6
7 #include <unordered_set> 7 #include <unordered_set>
8 #include <vector> 8 #include <vector>
9 9
10 #import "base/ios/weak_nsobject.h" 10 #import "base/ios/weak_nsobject.h"
11 #include "base/mac/objc_property_releaser.h" 11 #include "base/mac/objc_release_properties.h"
12 #include "base/mac/scoped_nsobject.h" 12 #include "base/mac/scoped_nsobject.h"
13 #include "base/strings/utf_string_conversions.h" 13 #include "base/strings/utf_string_conversions.h"
14 #include "components/autofill/core/browser/autofill_data_util.h" 14 #include "components/autofill/core/browser/autofill_data_util.h"
15 #include "components/autofill/core/browser/autofill_profile.h" 15 #include "components/autofill/core/browser/autofill_profile.h"
16 #include "components/autofill/core/browser/credit_card.h" 16 #include "components/autofill/core/browser/credit_card.h"
17 #include "components/autofill/core/browser/field_types.h" 17 #include "components/autofill/core/browser/field_types.h"
18 #include "components/autofill/core/browser/personal_data_manager.h" 18 #include "components/autofill/core/browser/personal_data_manager.h"
19 #include "ios/chrome/browser/application_context.h" 19 #include "ios/chrome/browser/application_context.h"
20 #include "ios/chrome/browser/payments/payment_request.h" 20 #include "ios/chrome/browser/payments/payment_request.h"
21 #include "ios/chrome/browser/payments/payment_request_utils.h" 21 #include "ios/chrome/browser/payments/payment_request_utils.h"
22 22
23 @interface PaymentRequestCoordinator () { 23 @interface PaymentRequestCoordinator () {
24 base::WeakNSProtocol<id<PaymentRequestCoordinatorDelegate>> _delegate; 24 base::WeakNSProtocol<id<PaymentRequestCoordinatorDelegate>> _delegate;
25 base::scoped_nsobject<UINavigationController> _navigationController; 25 base::scoped_nsobject<UINavigationController> _navigationController;
26 base::scoped_nsobject<PaymentRequestViewController> _viewController; 26 base::scoped_nsobject<PaymentRequestViewController> _viewController;
27 base::scoped_nsobject<PaymentItemsDisplayCoordinator> 27 base::scoped_nsobject<PaymentItemsDisplayCoordinator>
28 _itemsDisplayCoordinator; 28 _itemsDisplayCoordinator;
29 base::scoped_nsobject<ShippingAddressSelectionCoordinator> 29 base::scoped_nsobject<ShippingAddressSelectionCoordinator>
30 _shippingAddressSelectionCoordinator; 30 _shippingAddressSelectionCoordinator;
31 base::scoped_nsobject<ShippingOptionSelectionCoordinator> 31 base::scoped_nsobject<ShippingOptionSelectionCoordinator>
32 _shippingOptionSelectionCoordinator; 32 _shippingOptionSelectionCoordinator;
33 base::scoped_nsobject<PaymentMethodSelectionCoordinator> 33 base::scoped_nsobject<PaymentMethodSelectionCoordinator>
34 _methodSelectionCoordinator; 34 _methodSelectionCoordinator;
35
36 base::mac::ObjCPropertyReleaser _propertyReleaser_PaymentRequestCoordinator;
37 } 35 }
38 36
39 @end 37 @end
40 38
41 @implementation PaymentRequestCoordinator 39 @implementation PaymentRequestCoordinator
42 40
43 @synthesize paymentRequest = _paymentRequest; 41 @synthesize paymentRequest = _paymentRequest;
44 @synthesize pageFavicon = _pageFavicon; 42 @synthesize pageFavicon = _pageFavicon;
45 @synthesize pageTitle = _pageTitle; 43 @synthesize pageTitle = _pageTitle;
46 @synthesize pageHost = _pageHost; 44 @synthesize pageHost = _pageHost;
47 45
48 - (instancetype)initWithBaseViewController: 46 - (instancetype)initWithBaseViewController:
49 (UIViewController*)baseViewController { 47 (UIViewController*)baseViewController {
50 if ((self = [super initWithBaseViewController:baseViewController])) { 48 if ((self = [super initWithBaseViewController:baseViewController])) {
sdefresne 2017/02/14 16:34:26 Looks like this is now just calling super -initWit
Sidney San Martín 2017/02/14 21:38:15 Done, thanks. When I initially tried to remove thi
51 _propertyReleaser_PaymentRequestCoordinator.Init(
52 self, [PaymentRequestCoordinator class]);
53 } 49 }
54 return self; 50 return self;
55 } 51 }
56 52
53 - (void)dealloc {
54 base::mac::ReleaseProperties(self);
55 [super dealloc];
56 }
57
57 - (id<PaymentRequestCoordinatorDelegate>)delegate { 58 - (id<PaymentRequestCoordinatorDelegate>)delegate {
58 return _delegate.get(); 59 return _delegate.get();
59 } 60 }
60 61
61 - (void)setDelegate:(id<PaymentRequestCoordinatorDelegate>)delegate { 62 - (void)setDelegate:(id<PaymentRequestCoordinatorDelegate>)delegate {
62 _delegate.reset(delegate); 63 _delegate.reset(delegate);
63 } 64 }
64 65
65 - (void)start { 66 - (void)start {
66 _viewController.reset([[PaymentRequestViewController alloc] 67 _viewController.reset([[PaymentRequestViewController alloc]
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 _methodSelectionCoordinator.reset(); 258 _methodSelectionCoordinator.reset();
258 } 259 }
259 260
260 - (void)paymentMethodSelectionCoordinatorDidReturn: 261 - (void)paymentMethodSelectionCoordinatorDidReturn:
261 (PaymentMethodSelectionCoordinator*)coordinator { 262 (PaymentMethodSelectionCoordinator*)coordinator {
262 [_methodSelectionCoordinator stop]; 263 [_methodSelectionCoordinator stop];
263 _methodSelectionCoordinator.reset(); 264 _methodSelectionCoordinator.reset();
264 } 265 }
265 266
266 @end 267 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698