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

Unified Diff: ios/chrome/browser/crash_report/crash_restore_helper.mm

Issue 2916253003: [ObjC ARC] Converts ios/chrome/browser/crash_report:crash_report_internal to ARC. (Closed)
Patch Set: Created 3 years, 7 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
« no previous file with comments | « ios/chrome/browser/crash_report/crash_report_helper.mm ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/chrome/browser/crash_report/crash_restore_helper.mm
diff --git a/ios/chrome/browser/crash_report/crash_restore_helper.mm b/ios/chrome/browser/crash_report/crash_restore_helper.mm
index 12b96763967641aa3707160212fef4d2037c7bf3..2b8f9ad372eddd7d041bccab9febe476da4f09d1 100644
--- a/ios/chrome/browser/crash_report/crash_restore_helper.mm
+++ b/ios/chrome/browser/crash_report/crash_restore_helper.mm
@@ -29,6 +29,10 @@
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/resource/resource_bundle.h"
+#if !defined(__has_feature) || !__has_feature(objc_arc)
+#error "This file requires ARC support."
+#endif
+
@protocol InfoBarManagerObserverBridgeProtocol
- (void)infoBarRemoved:(infobars::InfoBar*)infobar;
@end
@@ -110,16 +114,14 @@ class SessionCrashedInfoBarDelegate : public ConfirmInfoBarDelegate {
int GetIconId() const override;
// The CrashRestoreHelper to restore sessions.
- base::scoped_nsobject<CrashRestoreHelper> crash_restore_helper_;
- // The TabModel to restore sessions to.
- base::scoped_nsobject<TabModel> tab_model_;
+ CrashRestoreHelper* crash_restore_helper_;
DISALLOW_COPY_AND_ASSIGN(SessionCrashedInfoBarDelegate);
};
SessionCrashedInfoBarDelegate::SessionCrashedInfoBarDelegate(
CrashRestoreHelper* crash_restore_helper)
- : crash_restore_helper_([crash_restore_helper retain]) {}
+ : crash_restore_helper_(crash_restore_helper) {}
SessionCrashedInfoBarDelegate::~SessionCrashedInfoBarDelegate() {}
@@ -171,7 +173,7 @@ int SessionCrashedInfoBarDelegate::GetIconId() const {
BOOL _needRestoration;
std::unique_ptr<InfoBarManagerObserverBridge> _infoBarBridge;
// The TabModel to restore sessions to.
- base::scoped_nsobject<TabModel> _tabModel;
+ TabModel* _tabModel;
// Indicate that the session has been restored to tabs or to recently closed
// and should not be rerestored.
@@ -195,7 +197,7 @@ int SessionCrashedInfoBarDelegate::GetIconId() const {
DCHECK([tabModel currentTab]);
infobars::InfoBarManager* infoBarManager =
[[tabModel currentTab] infoBarManager];
- _tabModel.reset([tabModel retain]);
+ _tabModel = tabModel;
SessionCrashedInfoBarDelegate::Create(infoBarManager, self);
_infoBarBridge.reset(new InfoBarManagerObserverBridge(infoBarManager, self));
}
« no previous file with comments | « ios/chrome/browser/crash_report/crash_report_helper.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698