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

Unified Diff: chromeos/dbus/arc_bridge_client.cc

Issue 1421023002: Remove the ARC Bridge Service (Closed) Base URL: https://chromium.googlesource.com/a/chromium/src.git@master
Patch Set: Removing the service instead of renaming it Created 5 years, 1 month 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
« no previous file with comments | « chromeos/dbus/arc_bridge_client.h ('k') | chromeos/dbus/dbus_client_bundle.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromeos/dbus/arc_bridge_client.cc
diff --git a/chromeos/dbus/arc_bridge_client.cc b/chromeos/dbus/arc_bridge_client.cc
deleted file mode 100644
index 584e10bc5e9557ba763b401deb6f66883739200a..0000000000000000000000000000000000000000
--- a/chromeos/dbus/arc_bridge_client.cc
+++ /dev/null
@@ -1,77 +0,0 @@
-// Copyright (c) 2015 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.
-#include "chromeos/dbus/arc_bridge_client.h"
-
-#include "base/bind.h"
-#include "base/logging.h"
-#include "base/memory/weak_ptr.h"
-#include "dbus/bus.h"
-#include "dbus/message.h"
-#include "dbus/object_path.h"
-#include "dbus/object_proxy.h"
-
-namespace chromeos {
-
-namespace {
-
-// todo(denniskempin): Move constants to the chromiumos platform
-// service_constants.h
-const char kArcBridgeServicePath[] = "/org/chromium/arc";
-const char kArcBridgeServiceName[] = "org.chromium.arc";
-const char kArcBridgeServiceInterface[] = "org.chromium.arc";
-
-const char kPingMethod[] = "Ping";
-
-void OnVoidDBusMethod(const VoidDBusMethodCallback& callback,
- dbus::Response* response) {
- callback.Run(response ? DBUS_METHOD_CALL_SUCCESS : DBUS_METHOD_CALL_FAILURE);
-}
-
-class ArcBridgeClientImpl : public ArcBridgeClient {
- public:
- ArcBridgeClientImpl() : proxy_(nullptr), weak_ptr_factory_(this) {}
-
- ~ArcBridgeClientImpl() override {}
-
- // Calls Ping method. |callback| is called after the method call succeeds.
- void Ping(const VoidDBusMethodCallback& callback) override {
- DCHECK(proxy_);
-
- dbus::MethodCall method_call(kArcBridgeServiceInterface, kPingMethod);
- proxy_->CallMethod(&method_call, dbus::ObjectProxy::TIMEOUT_USE_DEFAULT,
- base::Bind(&OnVoidDBusMethod, callback));
- }
-
- protected:
- void Init(dbus::Bus* bus) override {
- proxy_ = bus->GetObjectProxy(kArcBridgeServiceName,
- dbus::ObjectPath(kArcBridgeServicePath));
- DCHECK(proxy_);
- }
-
- private:
- dbus::ObjectProxy* proxy_;
-
- // Note: This should remain the last member so it'll be destroyed and
- // invalidate its weak pointers before any other members are destroyed.
- base::WeakPtrFactory<ArcBridgeClientImpl> weak_ptr_factory_;
-
- DISALLOW_COPY_AND_ASSIGN(ArcBridgeClientImpl);
-};
-
-} // namespace
-
-////////////////////////////////////////////////////////////////////////////////
-// ArcBridgeClient
-
-ArcBridgeClient::ArcBridgeClient() {}
-
-ArcBridgeClient::~ArcBridgeClient() {}
-
-// static
-ArcBridgeClient* ArcBridgeClient::Create() {
- return new ArcBridgeClientImpl();
-}
-
-} // namespace chromeos
« no previous file with comments | « chromeos/dbus/arc_bridge_client.h ('k') | chromeos/dbus/dbus_client_bundle.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698