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

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

Issue 2574463002: [ObjC ARC] Converts ios/chrome/browser/infobars:infobars to ARC.\n\nAutomatically generated ARCMigr… (Closed)
Patch Set: retain-autorelease Created 4 years 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
Index: ios/chrome/browser/translate/after_translate_infobar_controller.mm
diff --git a/ios/chrome/browser/translate/after_translate_infobar_controller.mm b/ios/chrome/browser/translate/after_translate_infobar_controller.mm
index bd7a5795d1030a1da8618a67d4b15aa79540b642..8ec9e2d215fe7904a042c3a32828c4cea0122f3d 100644
--- a/ios/chrome/browser/translate/after_translate_infobar_controller.mm
+++ b/ios/chrome/browser/translate/after_translate_infobar_controller.mm
@@ -4,6 +4,7 @@
#include "ios/chrome/browser/translate/after_translate_infobar_controller.h"
+#include "base/mac/scoped_nsobject.h"
#include "base/strings/sys_string_conversions.h"
#include "base/strings/utf_string_conversions.h"
#include "components/strings/grit/components_strings.h"
@@ -29,9 +30,9 @@
#pragma mark -
#pragma mark InfoBarControllerProtocol
-- (base::scoped_nsobject<UIView<InfoBarViewProtocol>>)
- viewForDelegate:(infobars::InfoBarDelegate*)delegate
- frame:(CGRect)frame {
+- (UIView<InfoBarViewProtocol>*)viewForDelegate:
+ (infobars::InfoBarDelegate*)delegate
+ frame:(CGRect)frame {
base::scoped_nsobject<UIView<InfoBarViewProtocol>> infoBarView;
_translateInfoBarDelegate = delegate->AsTranslateInfoBarDelegate();
DCHECK(_translateInfoBarDelegate);
@@ -89,7 +90,7 @@
target:self
action:@selector(infoBarSwitchDidPress:)];
}
- return infoBarView;
+ return [[infoBarView retain] autorelease];
}
#pragma mark - Handling of User Events

Powered by Google App Engine
This is Rietveld 408576698