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

Unified Diff: services/service_manager/public/cpp/lib/connector_impl.h

Issue 2857963004: Flatten Connector & ConnectorImpl (Closed)
Patch Set: . Created 3 years, 8 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: services/service_manager/public/cpp/lib/connector_impl.h
diff --git a/services/service_manager/public/cpp/lib/connector_impl.h b/services/service_manager/public/cpp/lib/connector_impl.h
deleted file mode 100644
index 68728c8a2e3910df849ad73cd857131ed536c947..0000000000000000000000000000000000000000
--- a/services/service_manager/public/cpp/lib/connector_impl.h
+++ /dev/null
@@ -1,73 +0,0 @@
-// Copyright 2016 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.
-
-#ifndef SERVICES_SERVICE_MANAGER_PUBLIC_CPP_LIB_CONNECTOR_IMPL_H_
-#define SERVICES_SERVICE_MANAGER_PUBLIC_CPP_LIB_CONNECTOR_IMPL_H_
-
-#include <map>
-#include <memory>
-
-#include "base/callback.h"
-#include "base/threading/thread_checker.h"
-#include "services/service_manager/public/cpp/connector.h"
-#include "services/service_manager/public/interfaces/connector.mojom.h"
-
-namespace service_manager {
-
-class ConnectorImpl : public Connector {
- public:
- explicit ConnectorImpl(mojom::ConnectorPtrInfo unbound_state);
- explicit ConnectorImpl(mojom::ConnectorPtr connector);
- ~ConnectorImpl() override;
-
- private:
- void OnConnectionError();
-
- // Connector:
- void StartService(const Identity& identity) override;
- void StartService(const std::string& name) override;
- void StartService(const Identity& identity,
- mojom::ServicePtr service,
- mojom::PIDReceiverRequest pid_receiver_request) override;
- void BindInterface(const Identity& target,
- const std::string& interface_name,
- mojo::ScopedMessagePipeHandle interface_pipe) override;
- std::unique_ptr<Connector> Clone() override;
- void FilterInterfaces(const std::string& spec,
- const Identity& source_identity,
- mojom::InterfaceProviderRequest request,
- mojom::InterfaceProviderPtr target) override;
- void BindConnectorRequest(mojom::ConnectorRequest request) override;
- base::WeakPtr<Connector> GetWeakPtr() override;
- void OverrideBinderForTesting(const std::string& service_name,
- const std::string& interface_name,
- const TestApi::Binder& binder) override;
- void ClearBinderOverrides() override;
- void SetStartServiceCallback(const StartServiceCallback& callback) override;
- void ResetStartServiceCallback() override;
-
- bool BindConnectorIfNecessary();
-
- // Callback passed to mojom methods StartService()/BindInterface().
- void StartServiceCallback(mojom::ConnectResult result,
- const Identity& user_id);
-
- using BinderOverrideMap = std::map<std::string, TestApi::Binder>;
-
- mojom::ConnectorPtrInfo unbound_state_;
- mojom::ConnectorPtr connector_;
-
- base::ThreadChecker thread_checker_;
-
- std::map<std::string, BinderOverrideMap> local_binder_overrides_;
- Connector::StartServiceCallback start_service_callback_;
-
- base::WeakPtrFactory<ConnectorImpl> weak_factory_;
-
- DISALLOW_COPY_AND_ASSIGN(ConnectorImpl);
-};
-
-} // namespace service_manager
-
-#endif // SERVICES_SERVICE_MANAGER_PUBLIC_CPP_LIB_CONNECTOR_IMPL_H_
« no previous file with comments | « services/service_manager/public/cpp/connector.cc ('k') | services/service_manager/public/cpp/lib/connector_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698