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

Unified Diff: ceee/ie/broker/broker_rpc_client.h

Issue 5258006: Restart of ceee_broker on crash. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 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 | « no previous file | ceee/ie/broker/broker_rpc_client.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ceee/ie/broker/broker_rpc_client.h
===================================================================
--- ceee/ie/broker/broker_rpc_client.h (revision 67905)
+++ ceee/ie/broker/broker_rpc_client.h (working copy)
@@ -10,6 +10,7 @@
#include <wtypes.h>
#include "base/basictypes.h"
+struct IUnknown;
// Interface for sending events.
class IEventSender {
public:
@@ -18,19 +19,21 @@
const char* event_args) = 0;
};
-
// Class provides communication with BrokerRpcServer.
class BrokerRpcClient : public IEventSender {
public:
- BrokerRpcClient();
+ // @param allow_restarts if true client will restart server if it is somehow
+ // gone after successful connecting. Client restarts server one time after
+ // each successful connecting.
+ explicit BrokerRpcClient(bool allow_restarts);
virtual ~BrokerRpcClient();
// Initialize connection with server.
- // @param start_server if true method will try to start server if it is
- // not started yet. Usually only tests pass false here.
+ // @param start_server if true method will try to start server if it is not
+ // started yet. Usually only tests pass false here.
virtual HRESULT Connect(bool start_server);
- // Relese connection with server
+ // Releases connection with server
virtual void Disconnect();
// Returns true if object ready for remote calls.
@@ -52,14 +55,24 @@
int bucket_count);
// @}
+ protected:
+ // Starts ceee broker process. This is unittest seam.
+ virtual HRESULT StartServer(IUnknown** server);
+
private:
void LockContext();
void ReleaseContext();
+ template<class Function, class Params>
+ HRESULT RunRpc(bool allow_restart,
+ Function rpc_function,
+ const Params& params);
+
RPC_BINDING_HANDLE binding_handle_;
// Context handle. It is required to make RPC server know number of active
// clients.
void* context_;
+ bool allow_restarts_;
DISALLOW_COPY_AND_ASSIGN(BrokerRpcClient);
};
« no previous file with comments | « no previous file | ceee/ie/broker/broker_rpc_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698