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

Unified Diff: remoting/client/ios/facade/ios_client_runtime_delegate.mm

Issue 2871993003: Moving the iOS directory to be remoting top level. (Closed)
Patch Set: //remoting/ios was the old landing target for the internal iOS application. Fix. Created 3 years, 7 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/client/ios/facade/ios_client_runtime_delegate.mm
diff --git a/remoting/client/ios/facade/ios_client_runtime_delegate.mm b/remoting/client/ios/facade/ios_client_runtime_delegate.mm
deleted file mode 100644
index b773b2aa1b1ccf6a8ecd5bb848b2ae27cad7ee0b..0000000000000000000000000000000000000000
--- a/remoting/client/ios/facade/ios_client_runtime_delegate.mm
+++ /dev/null
@@ -1,71 +0,0 @@
-// Copyright 2017 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#if !defined(__has_feature) || !__has_feature(objc_arc)
-#error "This file requires ARC support."
-#endif
-
-#include "remoting/client/ios/facade/ios_client_runtime_delegate.h"
-
-#import "base/mac/bind_objc_block.h"
-#import "remoting/client/ios/facade/remoting_authentication.h"
-#import "remoting/client/ios/facade/remoting_service.h"
-
-#include "base/bind.h"
-#include "base/logging.h"
-#include "base/macros.h"
-#include "base/memory/ptr_util.h"
-#include "base/memory/weak_ptr.h"
-
-namespace remoting {
-
-IosClientRuntimeDelegate::IosClientRuntimeDelegate() : weak_factory_(this) {
- runtime_ = ChromotingClientRuntime::GetInstance();
-}
-
-IosClientRuntimeDelegate::~IosClientRuntimeDelegate() {}
-
-void IosClientRuntimeDelegate::RuntimeWillShutdown() {
- DCHECK(runtime_->ui_task_runner()->BelongsToCurrentThread());
- // Nothing to do.
-}
-
-void IosClientRuntimeDelegate::RuntimeDidShutdown() {
- DCHECK(runtime_->ui_task_runner()->BelongsToCurrentThread());
- // Nothing to do.
-}
-
-void IosClientRuntimeDelegate::RequestAuthTokenForLogger() {
- if (!runtime_->ui_task_runner()->BelongsToCurrentThread()) {
- runtime_->ui_task_runner()->PostTask(
- FROM_HERE,
- base::Bind(&IosClientRuntimeDelegate::RequestAuthTokenForLogger,
- base::Unretained(this)));
- return;
- }
- 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) {
- // Set the new auth token for the log writer on the network thread.
- runtime_->network_task_runner()->PostTask(
- FROM_HERE, base::BindBlockArc(^{
- runtime_->log_writer()->SetAuthToken(access_token);
- }));
- } else {
- LOG(ERROR) << "Failed to fetch access token for log writer. ("
- << status << ")";
- }
- })];
- }
-}
-
-base::WeakPtr<IosClientRuntimeDelegate> IosClientRuntimeDelegate::GetWeakPtr() {
- return weak_factory_.GetWeakPtr();
-}
-
-} // namespace remoting
« no previous file with comments | « remoting/client/ios/facade/ios_client_runtime_delegate.h ('k') | remoting/client/ios/facade/remoting_authentication.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698