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

Unified Diff: ipc/ipc_channel_win.h

Issue 310293002: Make IPC::Channel polymorphic (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Another attempt to fix build breakage Created 6 years, 6 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
« no previous file with comments | « ipc/ipc_channel_proxy.cc ('k') | ipc/ipc_channel_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ipc/ipc_channel_win.h
diff --git a/ipc/ipc_channel_win.h b/ipc/ipc_channel_win.h
index 5bdba93cb53fe3547643a6ea0cfd69c687eda71f..29042bf1ca3ad0f76bbf64d5b1aee0cae74b57d1 100644
--- a/ipc/ipc_channel_win.h
+++ b/ipc/ipc_channel_win.h
@@ -21,18 +21,23 @@ class ThreadChecker;
namespace IPC {
-class Channel::ChannelImpl : public internal::ChannelReader,
- public base::MessageLoopForIO::IOHandler {
+class ChannelWin : public Channel,
+ public internal::ChannelReader,
+ public base::MessageLoopForIO::IOHandler {
public:
// Mirror methods of Channel, see ipc_channel.h for description.
- ChannelImpl(const IPC::ChannelHandle &channel_handle, Mode mode,
- Listener* listener);
- ~ChannelImpl();
- bool Connect();
- void Close();
- bool Send(Message* message);
+ ChannelWin(const IPC::ChannelHandle &channel_handle, Mode mode,
+ Listener* listener);
+ ~ChannelWin();
+
+ // Channel implementation
+ virtual bool Connect() OVERRIDE;
+ virtual void Close() OVERRIDE;
+ virtual bool Send(Message* message) OVERRIDE;
+ virtual base::ProcessId GetPeerPID() const OVERRIDE;
+
static bool IsNamedServerInitialized(const std::string& channel_id);
- base::ProcessId peer_pid() const { return peer_pid_; }
+
private:
// ChannelReader implementation.
@@ -58,7 +63,7 @@ class Channel::ChannelImpl : public internal::ChannelReader,
private:
struct State {
- explicit State(ChannelImpl* channel);
+ explicit State(ChannelWin* channel);
~State();
base::MessageLoopForIO::IOContext context;
bool is_pending;
@@ -94,11 +99,11 @@ class Channel::ChannelImpl : public internal::ChannelReader,
int32 client_secret_;
- base::WeakPtrFactory<ChannelImpl> weak_factory_;
+ base::WeakPtrFactory<ChannelWin> weak_factory_;
scoped_ptr<base::ThreadChecker> thread_check_;
- DISALLOW_COPY_AND_ASSIGN(ChannelImpl);
+ DISALLOW_COPY_AND_ASSIGN(ChannelWin);
};
} // namespace IPC
« no previous file with comments | « ipc/ipc_channel_proxy.cc ('k') | ipc/ipc_channel_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698