[ObjC ARC] Converts ios/chrome/browser/web:perf_tests to ARC.
Automatically generated ARCMigrate commit
Notable issues:None
BUG=624363
TEST=None
Review-Url: https://codereview.chromium.org/2886843003
Cr-Commit-Position: refs/heads/master@{#472559}
diff --git a/ios/chrome/browser/web/BUILD.gn b/ios/chrome/browser/web/BUILD.gn
index 67cf723..a947c05 100644
--- a/ios/chrome/browser/web/BUILD.gn
+++ b/ios/chrome/browser/web/BUILD.gn
@@ -343,6 +343,7 @@
}
source_set("perf_tests") {
+ configs += [ "//build/config/compiler:enable_arc" ]
testonly = true
sources = [
"early_page_script_perftest.mm",
diff --git a/ios/chrome/browser/web/early_page_script_perftest.mm b/ios/chrome/browser/web/early_page_script_perftest.mm
index 87cf2f1..7851e54 100644
--- a/ios/chrome/browser/web/early_page_script_perftest.mm
+++ b/ios/chrome/browser/web/early_page_script_perftest.mm
@@ -3,7 +3,6 @@
// found in the LICENSE file.
#include "base/mac/bundle_locations.h"
-#include "base/mac/scoped_nsobject.h"
#include "base/timer/elapsed_timer.h"
#include "ios/chrome/test/base/perf_test_ios.h"
#include "ios/web/public/test/fakes/test_browser_state.h"
@@ -14,6 +13,10 @@
#import <Foundation/Foundation.h>
#import <WebKit/WebKit.h>
+#if !defined(__has_feature) || !__has_feature(objc_arc)
+#error "This file requires ARC support."
+#endif
+
namespace {
// Class for testing early page script injection into WKWebView.
@@ -21,7 +24,7 @@
class EarlyPageScriptPerfTest : public PerfTest {
protected:
EarlyPageScriptPerfTest() : PerfTest("Early Page Script for WKWebView") {
- web_view_.reset([web::BuildWKWebView(CGRectZero, &browser_state_) retain]);
+ web_view_ = web::BuildWKWebView(CGRectZero, &browser_state_);
}
// Injects early script into WKWebView.
@@ -32,7 +35,7 @@
// BrowserState required for web view creation.
web::TestBrowserState browser_state_;
// WKWebView to test scripts injections.
- base::scoped_nsobject<WKWebView> web_view_;
+ WKWebView* web_view_;
};
// Tests script loading time.