Commit 9dc011f6 authored by stkhapugin's avatar stkhapugin Committed by Commit bot

[ObjC ARC] Converts ios/chrome/browser/geolocation:test_support to ARC.

Automatically generated ARCMigrate commit
Notable issues:None
BUG=624363
TEST=None

Review-Url: https://codereview.chromium.org/2510133003
Cr-Commit-Position: refs/heads/master@{#436283}
parent 371d4181
...@@ -34,6 +34,7 @@ source_set("geolocation") { ...@@ -34,6 +34,7 @@ source_set("geolocation") {
} }
source_set("test_support") { source_set("test_support") {
configs += [ "//build/config/compiler:enable_arc" ]
testonly = true testonly = true
sources = [ sources = [
"test_location_manager.h", "test_location_manager.h",
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
@property(nonatomic, assign) CLAuthorizationStatus authorizationStatus; @property(nonatomic, assign) CLAuthorizationStatus authorizationStatus;
// Writable version of the LocationManager |currentLocation| property. // Writable version of the LocationManager |currentLocation| property.
@property(nonatomic, retain) CLLocation* currentLocation; @property(nonatomic, strong) CLLocation* currentLocation;
// Writable version of the LocationManager |locationServicesEnabled| property. // Writable version of the LocationManager |locationServicesEnabled| property.
@property(nonatomic, assign) BOOL locationServicesEnabled; @property(nonatomic, assign) BOOL locationServicesEnabled;
......
...@@ -4,24 +4,20 @@ ...@@ -4,24 +4,20 @@
#import "ios/chrome/browser/geolocation/test_location_manager.h" #import "ios/chrome/browser/geolocation/test_location_manager.h"
#include "base/mac/scoped_nsobject.h" #if !defined(__has_feature) || !__has_feature(objc_arc)
#error "This file requires ARC support."
#endif
@interface TestLocationManager () { @interface TestLocationManager ()
CLAuthorizationStatus _authorizationStatus;
base::scoped_nsobject<CLLocation> _currentLocation;
BOOL _locationServicesEnabled;
BOOL _started;
BOOL _stopped;
}
@end @end
@implementation TestLocationManager @implementation TestLocationManager
@synthesize authorizationStatus = _authorizationStatus; @synthesize authorizationStatus = _authorizationStatus;
@synthesize locationServicesEnabled = _locationServicesEnabled; @synthesize locationServicesEnabled = _locationServicesEnabled;
@synthesize started = _started; @synthesize started = _started;
@synthesize stopped = _stopped; @synthesize stopped = _stopped;
@synthesize currentLocation = _currentLocation;
- (id)init { - (id)init {
self = [super init]; self = [super init];
...@@ -38,17 +34,9 @@ ...@@ -38,17 +34,9 @@
} }
} }
- (CLLocation*)currentLocation {
return _currentLocation;
}
- (void)setCurrentLocation:(CLLocation*)currentLocation {
_currentLocation.reset([currentLocation retain]);
}
- (void)reset { - (void)reset {
_authorizationStatus = kCLAuthorizationStatusNotDetermined; _authorizationStatus = kCLAuthorizationStatusNotDetermined;
_currentLocation.reset(); _currentLocation = nil;
_locationServicesEnabled = YES; _locationServicesEnabled = YES;
_started = NO; _started = NO;
_stopped = NO; _stopped = NO;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment