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

Unified Diff: ios/chrome/browser/infobars/infobar_utils.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/infobars/infobar_utils.mm
diff --git a/ios/chrome/browser/infobars/infobar_utils.mm b/ios/chrome/browser/infobars/infobar_utils.mm
index 37ad255a83cc4d155e27ffc7e36707c71666a0ad..46fc48e7e64a4cf868bc461bf12172a11df15d54 100644
--- a/ios/chrome/browser/infobars/infobar_utils.mm
+++ b/ios/chrome/browser/infobars/infobar_utils.mm
@@ -7,16 +7,19 @@
#include <memory>
#include <utility>
-#include "base/mac/scoped_nsobject.h"
#include "components/infobars/core/confirm_infobar_delegate.h"
#include "ios/chrome/browser/infobars/confirm_infobar_controller.h"
#include "ios/chrome/browser/infobars/infobar.h"
+#if !defined(__has_feature) || !__has_feature(objc_arc)
+#error "This file requires ARC support."
+#endif
+
std::unique_ptr<infobars::InfoBar> CreateConfirmInfoBar(
std::unique_ptr<ConfirmInfoBarDelegate> delegate) {
std::unique_ptr<InfoBarIOS> infobar(new InfoBarIOS(std::move(delegate)));
- base::scoped_nsobject<ConfirmInfoBarController> controller(
- [[ConfirmInfoBarController alloc] initWithDelegate:infobar.get()]);
+ ConfirmInfoBarController* controller =
+ [[ConfirmInfoBarController alloc] initWithDelegate:infobar.get()];
infobar->SetController(controller);
return std::move(infobar);
}

Powered by Google App Engine
This is Rietveld 408576698