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

Side by Side Diff: ipc/ipc_channel_win.h

Issue 7486007: Fix NamedProxyLauncher on Windows. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ... Created 9 years, 5 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef IPC_IPC_CHANNEL_WIN_H_ 5 #ifndef IPC_IPC_CHANNEL_WIN_H_
6 #define IPC_IPC_CHANNEL_WIN_H_ 6 #define IPC_IPC_CHANNEL_WIN_H_
7 #pragma once 7 #pragma once
8 8
9 #include "ipc/ipc_channel.h" 9 #include "ipc/ipc_channel.h"
10 10
(...skipping 13 matching lines...) Expand all
24 public: 24 public:
25 // Mirror methods of Channel, see ipc_channel.h for description. 25 // Mirror methods of Channel, see ipc_channel.h for description.
26 ChannelImpl(const IPC::ChannelHandle &channel_handle, Mode mode, 26 ChannelImpl(const IPC::ChannelHandle &channel_handle, Mode mode,
27 Listener* listener); 27 Listener* listener);
28 ~ChannelImpl(); 28 ~ChannelImpl();
29 bool Connect(); 29 bool Connect();
30 void Close(); 30 void Close();
31 void set_listener(Listener* listener) { listener_ = listener; } 31 void set_listener(Listener* listener) { listener_ = listener; }
32 bool Send(Message* message); 32 bool Send(Message* message);
33 private: 33 private:
34 const std::wstring PipeName(const std::string& channel_id) const;
35 bool CreatePipe(const IPC::ChannelHandle &channel_handle, Mode mode); 34 bool CreatePipe(const IPC::ChannelHandle &channel_handle, Mode mode);
36 35
37 bool ProcessConnection(); 36 bool ProcessConnection();
38 bool ProcessIncomingMessages(MessageLoopForIO::IOContext* context, 37 bool ProcessIncomingMessages(MessageLoopForIO::IOContext* context,
39 DWORD bytes_read); 38 DWORD bytes_read);
40 bool ProcessOutgoingMessages(MessageLoopForIO::IOContext* context, 39 bool ProcessOutgoingMessages(MessageLoopForIO::IOContext* context,
41 DWORD bytes_written); 40 DWORD bytes_written);
42 41
43 // MessageLoop::IOHandler implementation. 42 // MessageLoop::IOHandler implementation.
44 virtual void OnIOCompleted(MessageLoopForIO::IOContext* context, 43 virtual void OnIOCompleted(MessageLoopForIO::IOContext* context,
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 // problems. TODO(darin): make this unnecessary 77 // problems. TODO(darin): make this unnecessary
79 bool processing_incoming_; 78 bool processing_incoming_;
80 79
81 ScopedRunnableMethodFactory<ChannelImpl> factory_; 80 ScopedRunnableMethodFactory<ChannelImpl> factory_;
82 81
83 scoped_ptr<base::NonThreadSafe> thread_check_; 82 scoped_ptr<base::NonThreadSafe> thread_check_;
84 83
85 DISALLOW_COPY_AND_ASSIGN(ChannelImpl); 84 DISALLOW_COPY_AND_ASSIGN(ChannelImpl);
86 }; 85 };
87 86
87 const std::wstring PipeNameFromChannelId(const std::string& channel_id);
88
88 } // namespace IPC 89 } // namespace IPC
89 90
90 #endif // IPC_IPC_CHANNEL_WIN_H_ 91 #endif // IPC_IPC_CHANNEL_WIN_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698