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

Unified Diff: ios/chrome/app/application_delegate/memory_warning_helper_unittest.mm

Issue 2708683002: [ObjC ARC] Converts ios/chrome/app/application_delegate:unit_tests to ARC. (Closed)
Patch Set: fix compile Created 3 years, 10 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/app/application_delegate/memory_warning_helper_unittest.mm
diff --git a/ios/chrome/app/application_delegate/memory_warning_helper_unittest.mm b/ios/chrome/app/application_delegate/memory_warning_helper_unittest.mm
index 8052c0138de9ffc4d485b9e7cb66e02b98bbd055..718f19d3e6d0c4f33038d070ff9a12ffdde5bf2c 100644
--- a/ios/chrome/app/application_delegate/memory_warning_helper_unittest.mm
+++ b/ios/chrome/app/application_delegate/memory_warning_helper_unittest.mm
@@ -5,7 +5,6 @@
#import "ios/chrome/app/application_delegate/memory_warning_helper.h"
#include "base/mac/bind_objc_block.h"
-#import "base/mac/scoped_nsobject.h"
#include "base/memory/memory_pressure_listener.h"
#include "base/message_loop/message_loop.h"
#include "base/run_loop.h"
@@ -13,6 +12,10 @@
#import "ios/chrome/browser/metrics/previous_session_info.h"
#include "testing/platform_test.h"
+#if !defined(__has_feature) || !__has_feature(objc_arc)
+#error "This file requires ARC support."
+#endif
+
using previous_session_info_constants::
kDidSeeMemoryWarningShortlyBeforeTerminating;
@@ -34,7 +37,7 @@ class MemoryWarningHelperTest : public PlatformTest {
MemoryWarningHelper* GetMemoryHelper() {
if (!memory_helper_) {
- memory_helper_.reset([[MemoryWarningHelper alloc] init]);
+ memory_helper_ = [[MemoryWarningHelper alloc] init];
}
return memory_helper_;
}
@@ -53,7 +56,7 @@ class MemoryWarningHelperTest : public PlatformTest {
base::RunLoop run_loop_;
base::MemoryPressureListener::MemoryPressureLevel memory_pressure_level_;
std::unique_ptr<base::MemoryPressureListener> memory_pressure_listener_;
- base::scoped_nsobject<MemoryWarningHelper> memory_helper_;
+ MemoryWarningHelper* memory_helper_;
DISALLOW_COPY_AND_ASSIGN(MemoryWarningHelperTest);
};

Powered by Google App Engine
This is Rietveld 408576698