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

Unified Diff: ios/chrome/browser/translate/before_translate_infobar_controller.mm

Issue 793463004: Fix crash when using the language picker on iOS (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/chrome/browser/translate/before_translate_infobar_controller.mm
diff --git a/ios/chrome/browser/translate/before_translate_infobar_controller.mm b/ios/chrome/browser/translate/before_translate_infobar_controller.mm
index 5129fba277793fe8de3e7d70ad025b17ed9f638c..8b98d4b830151e9e8c429752dffed19b19528cf5 100644
--- a/ios/chrome/browser/translate/before_translate_infobar_controller.mm
+++ b/ios/chrome/browser/translate/before_translate_infobar_controller.mm
@@ -216,15 +216,15 @@ NSTimeInterval kPickerAnimationDurationInSeconds = 0.2;
languagePickerFrame.size.height + navigationBarFrame.size.height;
languagePickerFrame.origin.y += animationHeight;
navigationBarFrame.origin.y += animationHeight;
- base::scoped_nsobject<UIView> blockLanguagePicker(_languagePicker);
- base::scoped_nsobject<UIView> blockNavigationBar(_navigationBar);
+ auto blockLanguagePicker(_languagePicker);
+ auto blockNavigationBar(_navigationBar);
_languagePicker.reset();
_navigationBar.reset();
void (^animations)(void) = ^{
blockLanguagePicker.get().frame = languagePickerFrame;
blockNavigationBar.get().frame = navigationBarFrame;
};
- base::scoped_nsobject<UIView> blockSelectionView(_languageSelectionView);
+ auto blockSelectionView(_languageSelectionView);
_languageSelectionView.reset();
void (^completion)(BOOL finished) = ^(BOOL finished) {
[blockSelectionView removeFromSuperview];
@@ -336,8 +336,8 @@ NSTimeInterval kPickerAnimationDurationInSeconds = 0.2;
[_languagePicker setBackgroundColor:[infoBarView_ backgroundColor]];
[_languagePicker selectRow:selectedRow inComponent:0 animated:NO];
- base::scoped_nsobject<UIView> blockLanguagePicker(_languagePicker);
- base::scoped_nsobject<UIView> blockNavigationBar(_navigationBar);
+ auto blockLanguagePicker(_languagePicker);
+ auto blockNavigationBar(_navigationBar);
[UIView animateWithDuration:kPickerAnimationDurationInSeconds
animations:^{
blockLanguagePicker.get().frame = finalPickerFrame;
« 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