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

Side by Side Diff: ios/chrome/browser/ui/elements/selector_coordinator.mm

Issue 2353033002: Fix memory leak reported by clang static analyzer. (Closed)
Patch Set: 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/ui/elements/selector_coordinator.h" 5 #import "ios/chrome/browser/ui/elements/selector_coordinator.h"
6 6
7 #import "base/mac/objc_property_releaser.h" 7 #import "base/mac/objc_property_releaser.h"
8 #import "ios/chrome/browser/ui/elements/selector_picker_view_controller.h" 8 #import "ios/chrome/browser/ui/elements/selector_picker_view_controller.h"
9 #import "ios/chrome/browser/ui/elements/selector_picker_presentation_controller. h" 9 #import "ios/chrome/browser/ui/elements/selector_picker_presentation_controller. h"
10 #import "ios/chrome/browser/ui/elements/selector_view_controller_delegate.h" 10 #import "ios/chrome/browser/ui/elements/selector_view_controller_delegate.h"
(...skipping 22 matching lines...) Expand all
33 (nullable UIViewController*)viewController { 33 (nullable UIViewController*)viewController {
34 self = [super initWithBaseViewController:viewController]; 34 self = [super initWithBaseViewController:viewController];
35 if (self) { 35 if (self) {
36 _propertyReleaser_SelectorCoordinator.Init(self, 36 _propertyReleaser_SelectorCoordinator.Init(self,
37 [SelectorCoordinator class]); 37 [SelectorCoordinator class]);
38 } 38 }
39 return self; 39 return self;
40 } 40 }
41 41
42 - (void)start { 42 - (void)start {
43 self.selectorPickerViewController = 43 self.selectorPickerViewController = [[[SelectorPickerViewController alloc]
44 [[SelectorPickerViewController alloc] initWithOptions:self.options 44 initWithOptions:self.options
45 default:self.defaultOption]; 45 default:self.defaultOption] autorelease];
46 self.selectorPickerViewController.delegate = self; 46 self.selectorPickerViewController.delegate = self;
47 47
48 self.selectorPickerViewController.modalTransitionStyle = 48 self.selectorPickerViewController.modalTransitionStyle =
49 UIModalTransitionStyleCoverVertical; 49 UIModalTransitionStyleCoverVertical;
50 self.selectorPickerViewController.modalPresentationStyle = 50 self.selectorPickerViewController.modalPresentationStyle =
51 UIModalPresentationCustom; 51 UIModalPresentationCustom;
52 self.selectorPickerViewController.transitioningDelegate = self; 52 self.selectorPickerViewController.transitioningDelegate = self;
53 53
54 [self.baseViewController 54 [self.baseViewController
55 presentViewController:self.selectorPickerViewController 55 presentViewController:self.selectorPickerViewController
(...skipping 18 matching lines...) Expand all
74 74
75 - (UIPresentationController*) 75 - (UIPresentationController*)
76 presentationControllerForPresentedViewController:(UIViewController*)presented 76 presentationControllerForPresentedViewController:(UIViewController*)presented
77 presentingViewController:(UIViewController*)presenting 77 presentingViewController:(UIViewController*)presenting
78 sourceViewController:(UIViewController*)source { 78 sourceViewController:(UIViewController*)source {
79 return [[[SelectorPickerPresentationController alloc] 79 return [[[SelectorPickerPresentationController alloc]
80 initWithPresentedViewController:self.selectorPickerViewController 80 initWithPresentedViewController:self.selectorPickerViewController
81 presentingViewController:self.baseViewController] autorelease]; 81 presentingViewController:self.baseViewController] autorelease];
82 } 82 }
83 83
84 @end 84 @end
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698