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

Unified Diff: ios/public/provider/chrome/browser/signin/fake_chrome_identity_service.mm

Issue 2930303002: [ObjC ARC] Converts ios/chrome/browser/signin:test_support to ARC. (Closed)
Patch Set: [ObjC ARC] Converts ios/public/provider/chrome/browser/signin:test_support to ARC. 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/public/provider/chrome/browser/signin/fake_chrome_identity_interaction_manager.mm ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/public/provider/chrome/browser/signin/fake_chrome_identity_service.mm
diff --git a/ios/public/provider/chrome/browser/signin/fake_chrome_identity_service.mm b/ios/public/provider/chrome/browser/signin/fake_chrome_identity_service.mm
index d68a3397bdcfeefb187ce72836dc081b86ce877e..d6ca97753a4e3354d309afbf395d3f06d9a4c787 100644
--- a/ios/public/provider/chrome/browser/signin/fake_chrome_identity_service.mm
+++ b/ios/public/provider/chrome/browser/signin/fake_chrome_identity_service.mm
@@ -24,8 +24,7 @@ void FakeGetAccessToken(ChromeIdentity*,
const std::string&,
const std::set<std::string>&,
const ios::AccessTokenCallback& callback) {
- base::mac::ScopedBlock<ios::AccessTokenCallback> safe_callback(
- [callback copy]);
+ ios::AccessTokenCallback safe_callback = [callback copy];
// |GetAccessToken| is normally an asynchronous operation (that requires some
// network calls), this is replicated here by dispatching it.
@@ -37,7 +36,7 @@ void FakeGetAccessToken(ChromeIdentity*,
NSDate* expiresDate = [NSDate dateWithTimeIntervalSinceNow:expiration];
NSString* token = [expiresDate description];
- safe_callback.get()(token, expiresDate, nil);
+ safe_callback(token, expiresDate, nil);
});
}
@@ -71,7 +70,7 @@ void FakeGetHostedDomainForIdentity(ChromeIdentity* identity,
@interface FakeAccountDetailsViewController : UIViewController {
ChromeIdentity* _identity; // Weak.
- base::scoped_nsobject<UIButton> _removeAccountButton;
+ UIButton* _removeAccountButton;
}
@end
@@ -98,8 +97,7 @@ void FakeGetHostedDomainForIdentity(ChromeIdentity* identity,
// Obnoxious color, this is a test screen.
self.view.backgroundColor = [UIColor orangeColor];
- _removeAccountButton.reset(
- [[UIButton buttonWithType:UIButtonTypeCustom] retain]);
+ _removeAccountButton = [[UIButton buttonWithType:UIButtonTypeCustom] retain];
[_removeAccountButton setTitle:@"Remove account"
forState:UIControlStateNormal];
[_removeAccountButton addTarget:self
@@ -146,8 +144,8 @@ base::scoped_nsobject<UINavigationController>
FakeChromeIdentityService::NewAccountDetails(
ChromeIdentity* identity,
id<ChromeIdentityBrowserOpener> browser_opener) {
- base::scoped_nsobject<UIViewController> accountDetailsViewController(
- [[FakeAccountDetailsViewController alloc] initWithIdentity:identity]);
+ UIViewController* accountDetailsViewController =
+ [[FakeAccountDetailsViewController alloc] initWithIdentity:identity];
base::scoped_nsobject<UINavigationController> navigationController(
[[UINavigationController alloc]
initWithRootViewController:accountDetailsViewController]);
« no previous file with comments | « ios/public/provider/chrome/browser/signin/fake_chrome_identity_interaction_manager.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698