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

Unified Diff: ios/chrome/browser/passwords/ios_chrome_password_manager_infobar_delegate.mm

Issue 2933873002: [ObjC ARC] Converts ios/chrome/browser/passwords:passwords to ARC. (Closed)
Patch Set: fix names and nil assignments. Created 3 years, 6 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
Index: ios/chrome/browser/passwords/ios_chrome_password_manager_infobar_delegate.mm
diff --git a/ios/chrome/browser/passwords/ios_chrome_password_manager_infobar_delegate.mm b/ios/chrome/browser/passwords/ios_chrome_password_manager_infobar_delegate.mm
index db7cea288ee4807706b5d6e7953853ad8986ddec..ecbb0ab6076f114c83587235a4a9aa4e0deeffeb 100644
--- a/ios/chrome/browser/passwords/ios_chrome_password_manager_infobar_delegate.mm
+++ b/ios/chrome/browser/passwords/ios_chrome_password_manager_infobar_delegate.mm
@@ -6,7 +6,6 @@
#include <utility>
-#include "base/mac/scoped_nsobject.h"
#include "base/strings/string16.h"
#include "components/password_manager/core/browser/password_form_manager.h"
#include "components/password_manager/core/browser/password_manager_constants.h"
@@ -19,6 +18,10 @@
#include "ui/base/l10n/l10n_util.h"
#include "url/gurl.h"
+#if !defined(__has_feature) || !__has_feature(objc_arc)
+#error "This file requires ARC support."
+#endif
+
IOSChromePasswordManagerInfoBarDelegate::
~IOSChromePasswordManagerInfoBarDelegate() {
password_manager::metrics_util::LogUIDismissalReason(infobar_response_);
@@ -49,12 +52,12 @@ int IOSChromePasswordManagerInfoBarDelegate::GetIconId() const {
bool IOSChromePasswordManagerInfoBarDelegate::LinkClicked(
WindowOpenDisposition disposition) {
- base::scoped_nsobject<OpenUrlCommand> command([[OpenUrlCommand alloc]
+ OpenUrlCommand* command = [[OpenUrlCommand alloc]
initWithURL:GURL(password_manager::kPasswordManagerHelpCenterSmartLock)
referrer:web::Referrer()
inIncognito:NO
inBackground:NO
- appendTo:kCurrentTab]);
+ appendTo:kCurrentTab];
UIWindow* mainWindow = [[UIApplication sharedApplication] keyWindow];
[mainWindow chromeExecuteCommand:command];
return true;

Powered by Google App Engine
This is Rietveld 408576698