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

Unified Diff: ios/chrome/browser/ui/preload_controller.mm

Issue 2804703002: [ObjC ARC] Converts ios/chrome/browser/ui:ui_internal_arc to ARC. (Closed)
Patch Set: comments Created 3 years, 8 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/ui/preload_controller.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/chrome/browser/ui/preload_controller.mm
diff --git a/ios/chrome/browser/ui/preload_controller.mm b/ios/chrome/browser/ui/preload_controller.mm
index c0de48e95d0679b42e038eb278c6d1f77defa9ff..f275f2e1e3b01d84f8d2cd844bdc8633c45430f2 100644
--- a/ios/chrome/browser/ui/preload_controller.mm
+++ b/ios/chrome/browser/ui/preload_controller.mm
@@ -8,7 +8,6 @@
#include "base/ios/device_util.h"
#include "base/logging.h"
-#include "base/mac/scoped_nsobject.h"
#include "base/metrics/field_trial.h"
#include "base/metrics/histogram_macros.h"
#include "base/strings/sys_string_conversions.h"
@@ -29,6 +28,10 @@
#include "net/url_request/url_fetcher_delegate.h"
#include "ui/base/page_transition_types.h"
+#if !defined(__has_feature) || !__has_feature(objc_arc)
+#error "This file requires ARC support."
+#endif
+
// ID of the URLFetcher responsible for prefetches.
const int kPreloadControllerURLFetcherID = 1;
@@ -102,7 +105,7 @@ class PrefetchDelegate : public net::URLFetcherDelegate {
}
private:
- PreloadController* owner_; // weak
+ __weak PreloadController* owner_;
};
@implementation PreloadController {
@@ -156,8 +159,6 @@ class PrefetchDelegate : public net::URLFetcherDelegate {
// Number of successful prerenders (i.e. the user viewed the prerendered page)
// during the lifetime of this controller.
int successfulPrerendersPerSessionCount_;
-
- id<PreloadControllerDelegate> delegate_; // weak
}
@synthesize prerenderedURL = prerenderedURL_;
@@ -205,7 +206,6 @@ class PrefetchDelegate : public net::URLFetcherDelegate {
successfulPrerendersPerSessionCount_);
[[NSNotificationCenter defaultCenter] removeObserver:self];
[self cancelPrerender];
- [super dealloc];
}
- (void)prerenderURL:(const GURL&)url
« no previous file with comments | « ios/chrome/browser/ui/preload_controller.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698