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

Unified Diff: ios/chrome/browser/translate/before_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/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 781e0b53f5346a14195c4870aa7e9e801b18c55a..d9624865b5da2480bd702b2ea55dc2f9762a5403 100644
--- a/ios/chrome/browser/translate/before_translate_infobar_controller.mm
+++ b/ios/chrome/browser/translate/before_translate_infobar_controller.mm
@@ -8,6 +8,7 @@
#import <UIKit/UIKit.h>
#include "base/logging.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"
@@ -127,9 +128,9 @@ NSTimeInterval kPickerAnimationDurationInSeconds = 0.2;
#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();
infoBarView.reset(
@@ -155,7 +156,7 @@ NSTimeInterval kPickerAnimationDurationInSeconds = 0.2;
tag2:TranslateInfoBarIOSTag::BEFORE_DENY
target:self
action:@selector(infoBarButtonDidPress:)];
- return infoBarView;
+ return [[infoBarView retain] autorelease];
}
- (void)updateInfobarLabelOnView:(UIView<InfoBarViewProtocol>*)view {

Powered by Google App Engine
This is Rietveld 408576698