Index: remoting/ios/facade/ios_client_runtime_delegate.mm |
diff --git a/remoting/ios/facade/ios_client_runtime_delegate.mm b/remoting/ios/facade/ios_client_runtime_delegate.mm |
index ebb3c798b4cff5ba84f2a44ef30195e0045c76ac..5c84ab6afe2fcf2fd98286885ae2a329acdb7d08 100644 |
--- a/remoting/ios/facade/ios_client_runtime_delegate.mm |
+++ b/remoting/ios/facade/ios_client_runtime_delegate.mm |
@@ -17,6 +17,7 @@ |
#include "base/macros.h" |
#include "base/memory/ptr_util.h" |
#include "base/memory/weak_ptr.h" |
+#include "base/strings/sys_string_conversions.h" |
namespace remoting { |
@@ -46,12 +47,11 @@ void IosClientRuntimeDelegate::RequestAuthTokenForLogger() { |
} |
if ([[RemotingService SharedInstance].authentication.user isAuthenticated]) { |
[[RemotingService SharedInstance].authentication |
- callbackWithAccessToken:base::BindBlockArc(^( |
- remoting::OAuthTokenGetter::Status status, |
- const std::string& user_email, |
- const std::string& access_token) { |
- if (status == remoting::OAuthTokenGetter::Status::SUCCESS) { |
+ callbackWithAccessToken:^(RemotingAuthenticationStatus status, |
+ NSString* userEmail, NSString* accessToken) { |
+ if (status == RemotingAuthenticationStatusSuccess) { |
// Set the new auth token for the log writer on the network thread. |
+ std::string access_token = base::SysNSStringToUTF8(accessToken); |
runtime_->network_task_runner()->PostTask( |
FROM_HERE, base::BindBlockArc(^{ |
runtime_->log_writer()->SetAuthToken(access_token); |
@@ -60,7 +60,7 @@ void IosClientRuntimeDelegate::RequestAuthTokenForLogger() { |
LOG(ERROR) << "Failed to fetch access token for log writer. (" |
<< status << ")"; |
} |
- })]; |
+ }]; |
} |
} |