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

Unified Diff: ios/chrome/browser/native_app_launcher/native_app_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/native_app_launcher/native_app_infobar_controller.mm
diff --git a/ios/chrome/browser/native_app_launcher/native_app_infobar_controller.mm b/ios/chrome/browser/native_app_launcher/native_app_infobar_controller.mm
index 54c08c42200555c5c71ecf16c8469298035be7de..48243604e7f6477f8b595620aa1a4b9ce7b4cc6a 100644
--- a/ios/chrome/browser/native_app_launcher/native_app_infobar_controller.mm
+++ b/ios/chrome/browser/native_app_launcher/native_app_infobar_controller.mm
@@ -5,6 +5,7 @@
#import "ios/chrome/browser/native_app_launcher/native_app_infobar_controller.h"
#include "base/logging.h"
+#include "base/mac/scoped_nsobject.h"
#include "base/strings/sys_string_conversions.h"
#include "ios/chrome/browser/native_app_launcher/native_app_infobar_delegate.h"
#include "ios/chrome/grit/ios_strings.h"
@@ -33,9 +34,9 @@
#pragma mark - InfoBarController
-- (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;
nativeAppInfoBarDelegate_ = static_cast<NativeAppInfoBarDelegate*>(delegate);
DCHECK(nativeAppInfoBarDelegate_);
@@ -96,7 +97,7 @@ viewForDelegate:(infobars::InfoBarDelegate*)delegate
break;
}
}
- return infoBarView;
+ return [[infoBarView retain] autorelease];
}
- (void)infoBarButtonDidPress:(UIButton*)button {
« no previous file with comments | « ios/chrome/browser/infobars/infobar_utils.mm ('k') | ios/chrome/browser/native_app_launcher/native_app_infobar_delegate.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698