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

Unified Diff: ios/web/net/request_tracker_impl.mm

Issue 2247303009: Converts ios/web/net to ARC. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ios-web
Patch Set: Removes web_arc_transition temporary target Created 4 years, 4 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/web/net/request_tracker_impl.mm
diff --git a/ios/web/net/request_tracker_impl.mm b/ios/web/net/request_tracker_impl.mm
index d49ba4309e955fb9b07be73fc3a903b46c096d65..fc634e11168de3922187ff0a997aa31085ec1de4 100644
--- a/ios/web/net/request_tracker_impl.mm
+++ b/ios/web/net/request_tracker_impl.mm
@@ -33,6 +33,10 @@
#include "net/http/http_response_headers.h"
#include "net/url_request/url_request.h"
+#if !defined(__has_feature) || !__has_feature(objc_arc)
+#error "This file requires ARC support."
+#endif
+
namespace {
struct EqualNSStrings {
@@ -254,7 +258,7 @@ struct TrackerCounts {
}
- (void)errorCallback:(BOOL)flag {
- base::scoped_nsobject<CRWSSLCarrier> scoped([self retain]);
+ base::scoped_nsobject<CRWSSLCarrier> scoped(self);
web::WebThread::PostTask(web::WebThread::IO, FROM_HERE,
base::Bind(&web::RequestTrackerImpl::ErrorCallback,
tracker_, scoped, flag));
@@ -368,7 +372,7 @@ RequestTrackerImpl::CreateTrackerForRequestGroupID(
void RequestTrackerImpl::StartPageLoad(const GURL& url, id user_info) {
DCHECK_CURRENTLY_ON(web::WebThread::UI);
- base::scoped_nsobject<id> scoped_user_info([user_info retain]);
+ base::scoped_nsobject<id> scoped_user_info(user_info);
web::WebThread::PostTask(
web::WebThread::IO, FROM_HERE,
base::Bind(&RequestTrackerImpl::TrimToURL, this, url, scoped_user_info));
@@ -1227,7 +1231,7 @@ void RequestTrackerImpl::TrimToURL(const GURL& full_url, id user_info) {
has_mixed_content_ = new_url_has_mixed_content;
page_url_ = url;
- user_info_.reset([user_info retain]);
+ user_info_.reset(user_info);
estimate_start_index_ = 0;
is_loading_ = true;
previous_estimate_ = 0.0f;

Powered by Google App Engine
This is Rietveld 408576698