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

Unified Diff: ios/web/public/serializable_user_data_manager_unittest.mm

Issue 2937503004: [ObjC ARC] Converts ios/web:ios_web_public_unittests to ARC. (Closed)
Patch Set: 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
« no previous file with comments | « ios/web/public/origin_util_unittest.mm ('k') | ios/web/public/test/crw_mock_web_state_delegate.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/web/public/serializable_user_data_manager_unittest.mm
diff --git a/ios/web/public/serializable_user_data_manager_unittest.mm b/ios/web/public/serializable_user_data_manager_unittest.mm
index 90d4019faf4f2ebb334a37fe11f5c96d7d424c68..11548be1252ecb84394ba881668419b7dd4a4e0c 100644
--- a/ios/web/public/serializable_user_data_manager_unittest.mm
+++ b/ios/web/public/serializable_user_data_manager_unittest.mm
@@ -4,11 +4,14 @@
#import "ios/web/public/serializable_user_data_manager.h"
-#import "base/mac/scoped_nsobject.h"
#import "ios/web/public/test/fakes/test_web_state.h"
#import "testing/gtest_mac.h"
#include "testing/platform_test.h"
+#if !defined(__has_feature) || !__has_feature(objc_arc)
+#error "This file requires ARC support."
+#endif
+
namespace {
// User Data and Key to use for tests.
NSString* const kTestUserData = @"TestUserData";
@@ -40,15 +43,15 @@ TEST_F(SerializableUserDataManagerTest, EncodeDecode) {
manager()->CreateSerializableUserData();
// Archive the serializable user data.
- base::scoped_nsobject<NSMutableData> data([[NSMutableData alloc] init]);
- base::scoped_nsobject<NSKeyedArchiver> archiver(
- [[NSKeyedArchiver alloc] initForWritingWithMutableData:data]);
+ NSMutableData* data = [[NSMutableData alloc] init];
+ NSKeyedArchiver* archiver =
+ [[NSKeyedArchiver alloc] initForWritingWithMutableData:data];
user_data->Encode(archiver);
[archiver finishEncoding];
// Create a new SerializableUserData by unarchiving.
- base::scoped_nsobject<NSKeyedUnarchiver> unarchiver(
- [[NSKeyedUnarchiver alloc] initForReadingWithData:data]);
+ NSKeyedUnarchiver* unarchiver =
+ [[NSKeyedUnarchiver alloc] initForReadingWithData:data];
std::unique_ptr<web::SerializableUserData> decoded_data =
web::SerializableUserData::Create();
decoded_data->Decode(unarchiver);
« no previous file with comments | « ios/web/public/origin_util_unittest.mm ('k') | ios/web/public/test/crw_mock_web_state_delegate.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698