OLD | NEW |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #if !defined(__has_feature) || !__has_feature(objc_arc) | 5 #if !defined(__has_feature) || !__has_feature(objc_arc) |
6 #error "This file requires ARC support." | 6 #error "This file requires ARC support." |
7 #endif | 7 #endif |
8 | 8 |
9 #import "remoting/client/ios/facade/remoting_authentication.h" | 9 #import "remoting/ios/facade/remoting_authentication.h" |
10 | 10 |
11 #import <Foundation/Foundation.h> | 11 #import <Foundation/Foundation.h> |
12 #import <Security/Security.h> | 12 #import <Security/Security.h> |
13 | 13 |
14 #import "base/mac/bind_objc_block.h" | 14 #import "base/mac/bind_objc_block.h" |
15 #import "remoting/client/ios/facade/host_info.h" | 15 #import "remoting/ios/facade/host_info.h" |
16 #import "remoting/client/ios/facade/host_list_fetcher.h" | 16 #import "remoting/ios/facade/host_list_fetcher.h" |
17 #import "remoting/client/ios/facade/ios_client_runtime_delegate.h" | 17 #import "remoting/ios/facade/ios_client_runtime_delegate.h" |
18 #import "remoting/client/ios/facade/remoting_service.h" | 18 #import "remoting/ios/facade/remoting_service.h" |
19 #import "remoting/client/ios/keychain_wrapper.h" | 19 #import "remoting/ios/keychain_wrapper.h" |
20 | 20 |
21 #include "base/logging.h" | 21 #include "base/logging.h" |
22 #include "base/strings/sys_string_conversions.h" | 22 #include "base/strings/sys_string_conversions.h" |
23 #include "net/url_request/url_request_context_getter.h" | 23 #include "net/url_request/url_request_context_getter.h" |
24 #include "remoting/base/oauth_token_getter.h" | 24 #include "remoting/base/oauth_token_getter.h" |
25 #include "remoting/base/oauth_token_getter_impl.h" | 25 #include "remoting/base/oauth_token_getter_impl.h" |
26 | 26 |
27 static NSString* const kCRDAuthenticatedUserEmailKey = | 27 static NSString* const kCRDAuthenticatedUserEmailKey = |
28 @"kCRDAuthenticatedUserEmailKey"; | 28 @"kCRDAuthenticatedUserEmailKey"; |
29 | 29 |
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
186 | 186 |
187 if (!user || ![user isAuthenticated]) { | 187 if (!user || ![user isAuthenticated]) { |
188 user = nil; | 188 user = nil; |
189 } else { | 189 } else { |
190 [self authenticateWithRefreshToken:user.refreshToken email:user.userEmail]; | 190 [self authenticateWithRefreshToken:user.refreshToken email:user.userEmail]; |
191 } | 191 } |
192 return user; | 192 return user; |
193 } | 193 } |
194 | 194 |
195 @end | 195 @end |
OLD | NEW |