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

Unified Diff: ios/chrome/browser/signin/gaia_auth_fetcher_ios.mm

Issue 2848673003: [ObjC ARC] Converts ios/chrome/browser/signin:signin to ARC. (Closed)
Patch Set: 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
Index: ios/chrome/browser/signin/gaia_auth_fetcher_ios.mm
diff --git a/ios/chrome/browser/signin/gaia_auth_fetcher_ios.mm b/ios/chrome/browser/signin/gaia_auth_fetcher_ios.mm
index 435743988eb94dc33bb71cf784c1e6879059ef53..61e179bc9122246409edcdf509e422b1db8aba56 100644
--- a/ios/chrome/browser/signin/gaia_auth_fetcher_ios.mm
+++ b/ios/chrome/browser/signin/gaia_auth_fetcher_ios.mm
@@ -10,7 +10,6 @@
#include "base/logging.h"
#import "base/mac/foundation_util.h"
#include "base/mac/scoped_block.h"
-#import "base/mac/scoped_nsobject.h"
#include "base/strings/sys_string_conversions.h"
#include "ios/chrome/browser/signin/gaia_auth_fetcher_ios_private.h"
#include "ios/web/public/browser_state.h"
@@ -21,6 +20,10 @@
#include "net/http/http_request_headers.h"
#include "net/url_request/url_request_status.h"
+#if !defined(__has_feature) || !__has_feature(objc_arc)
+#error "This file requires ARC support."
+#endif
+
namespace {
// Whether the iOS specialization of the GaiaAuthFetcher should be used.
@@ -81,8 +84,8 @@ NSString* const kReadResponseTemplate =
NSURLRequest* GetRequest(const std::string& body,
const std::string& headers,
const GURL& url) {
- base::scoped_nsobject<NSMutableURLRequest> request(
- [[NSMutableURLRequest alloc] initWithURL:net::NSURLWithGURL(url)]);
+ NSMutableURLRequest* request =
+ [[NSMutableURLRequest alloc] initWithURL:net::NSURLWithGURL(url)];
net::HttpRequestHeaders request_headers;
request_headers.AddHeadersFromString(headers);
for (net::HttpRequestHeaders::Iterator it(request_headers); it.GetNext();) {
@@ -98,7 +101,7 @@ NSURLRequest* GetRequest(const std::string& body,
[request setValue:@"application/x-www-form-urlencoded"
forHTTPHeaderField:@"Content-Type"];
}
- return request.autorelease();
+ return request;
}
// Escapes and quotes |value| and converts the result to an NSString.
@@ -281,7 +284,7 @@ WKWebView* GaiaAuthFetcherIOSBridge::GetWKWebView() {
return nil;
}
if (!web_view_) {
- web_view_.reset([BuildWKWebView() retain]);
+ web_view_.reset(BuildWKWebView());
navigation_delegate_.reset(
[[GaiaAuthFetcherNavigationDelegate alloc] initWithBridge:this]);
[web_view_ setNavigationDelegate:navigation_delegate_];

Powered by Google App Engine
This is Rietveld 408576698