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

Unified Diff: webrtc/examples/objc/AppRTCMobile/common/ARDUtilities.m

Issue 2780433006: Fix deprecated methods in AppRTCMobile. (Closed)
Patch Set: Created 3 years, 9 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: webrtc/examples/objc/AppRTCMobile/common/ARDUtilities.m
diff --git a/webrtc/examples/objc/AppRTCMobile/common/ARDUtilities.m b/webrtc/examples/objc/AppRTCMobile/common/ARDUtilities.m
index c9d029f629d13a3111daa3d46f8aa16f8d963cbe..0ae44da4be2b698547304619614dd07d142af924 100644
--- a/webrtc/examples/objc/AppRTCMobile/common/ARDUtilities.m
+++ b/webrtc/examples/objc/AppRTCMobile/common/ARDUtilities.m
@@ -47,15 +47,13 @@
NSData *data,
NSError *error))completionHandler {
// Kick off an async request which will call back on main thread.
- [NSURLConnection sendAsynchronousRequest:request
- queue:[NSOperationQueue mainQueue]
- completionHandler:^(NSURLResponse *response,
- NSData *data,
- NSError *error) {
- if (completionHandler) {
- completionHandler(response, data, error);
- }
- }];
+ NSURLSession *session = [NSURLSession sharedSession];
+ [[session dataTaskWithRequest:request
+ completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
+ if (completionHandler) {
+ completionHandler(response, data, error);
+ }
+ }] resume];
}
// Posts data to the specified URL.

Powered by Google App Engine
This is Rietveld 408576698