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

Unified Diff: remoting/ios/app/app_delegate.mm

Issue 2949713002: [CRD iOS] Refactor an interface for RemotingAuthorization (Closed)
Patch Set: Resolve feedback 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
Index: remoting/ios/app/app_delegate.mm
diff --git a/remoting/ios/app/app_delegate.mm b/remoting/ios/app/app_delegate.mm
index 50a7597cc81d116f771850da072ba007c50ce668..9a9abec72f1db60d50aad1e96c9e4b6f8000be5f 100644
--- a/remoting/ios/app/app_delegate.mm
+++ b/remoting/ios/app/app_delegate.mm
@@ -14,8 +14,7 @@
#import "remoting/ios/app/app_view_controller.h"
#import "remoting/ios/app/remoting_view_controller.h"
-#import "remoting/ios/facade/remoting_authentication.h"
-#import "remoting/ios/facade/remoting_service.h"
+#import "remoting/ios/facade/remoting_oauth_authentication.h"
@interface AppDelegate () {
AppViewController* _appViewController;
@@ -40,7 +39,11 @@
return YES;
}
+#ifndef NDEBUG
- (BOOL)application:(UIApplication*)application handleOpenURL:(NSURL*)url {
+ DCHECK([RemotingService.instance.authentication
+ isKindOfClass:[RemotingOAuthAuthentication class]]);
+
NSMutableDictionary* components = [[NSMutableDictionary alloc] init];
NSArray* urlComponents = [[url query] componentsSeparatedByString:@"&"];
@@ -52,12 +55,13 @@
}
NSString* authorizationCode = [components objectForKey:@"code"];
- [[RemotingService SharedInstance].authentication
+ [(RemotingOAuthAuthentication*)RemotingService.instance.authentication
authenticateWithAuthorizationCode:authorizationCode];
[self launchRemotingViewController];
return YES;
}
+#endif // ifndef NDEBUG
#pragma mark - Public
- (void)showMenuAnimated:(BOOL)animated {
@@ -88,7 +92,6 @@
UINavigationController* navController =
[[UINavigationController alloc] initWithRootViewController:vc];
navController.navigationBarHidden = true;
-
_appViewController =
[[AppViewController alloc] initWithMainViewController:navController];
self.window.rootViewController = _appViewController;

Powered by Google App Engine
This is Rietveld 408576698