summaryrefslogtreecommitdiffstats
path: root/ipc/ipc_channel_win.cc
Commit message (Collapse)AuthorAgeFilesLines
* IPC: Use ScopedHandle instead of a raw HANDLE for the private members.rvargas2014-09-261-38/+40
| | | | | | | | | BUG=387876 R=cpu@chromium.org Review URL: https://codereview.chromium.org/588383003 Cr-Commit-Position: refs/heads/master@{#297011}
* Remove IPC::Channel::TakePipeHandle()morrita2014-09-251-6/+0
| | | | | | | | | | | It doesn't work, and it is no longer used. BUG=416208 R=cpu@chromium.org, jam@chromium.org Review URL: https://codereview.chromium.org/601563002 Cr-Commit-Position: refs/heads/master@{#296820}
* IPC: Add more debug info.rvargas2014-09-161-5/+11
| | | | | | | | | | | | | | | | | We're still seeing crashes that appear to come from multiple simultaneous writes. Given that writing_ is false when we crash, but the operation matches the current thread, file handle and IPC Channel, it could be that for some reason a failed Write is still genarating a notification. So this CL stores two error codes (one for the current operation and another for a previous failure), and the write size. BUG=387876 R=cpu@chromium.org Review URL: https://codereview.chromium.org/564863003 Cr-Commit-Position: refs/heads/master@{#294993}
* Introduce ChannelMojomorrita@chromium.org2014-08-041-0/+10
| | | | | | | | | | | | | | | | | | This CL introduces ChannelMojo IPC::Channel implementation and optionally applies it for renderer-browser IPC channel. Current stability is like 5-seconds browser and There are rough edges. It often closes the channel so needs to be more robust. Even though the level of stability, having it in the tree will helps team to try and improve it. BUG=377980 R=darin@chromium.org,jam@chromium.org,viettrungluu@chromium.org TEST=ipc_channel_mojo_unittest.cc Review URL: https://codereview.chromium.org/382333002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@287402 0039d316-1c4b-4281-b951-d872f2087c98
* IPC: Add more debug logic (crash tracking)rvargas@chromium.org2014-07-311-2/+9
| | | | | | | | | BUG=387876 R=cpu@chromium.org Review URL: https://codereview.chromium.org/427693004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@286759 0039d316-1c4b-4281-b951-d872f2087c98
* IPC ChannelWin: Add temporary debug info.rvargas@chromium.org2014-06-271-3/+50
| | | | | | | | | | Add some state tracking info to the channel object while working on a crash. BUG=387876 Review URL: https://codereview.chromium.org/355943002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@280241 0039d316-1c4b-4281-b951-d872f2087c98
* The LOG initialization code would clear the last error. Use PLOG instead.weitaosu@chromium.org2014-06-261-3/+2
| | | | | | | | | | LOG(...) needs to perform log initialization when called for the first time. It may call Windows APIs that clears the last error in which case the message written to the log will contain the wrong last error code. PLOG does the right thing by getting the last error code before initialing the log file. BUG= Review URL: https://codereview.chromium.org/331883009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@280103 0039d316-1c4b-4281-b951-d872f2087c98
* Make IPC::Channel polymorphicmorrita@chromium.org2014-06-061-44/+30
| | | | | | | | | | | | | | This change makes each platform specific ChannelImpl into a subclass of Channel: ChannelPosix, ChannelWin, ChannelNacl. delegated functions are now virtual. TEST=none BUG=377980 R=darin@chromium.org, jam@chromium.org Review URL: https://codereview.chromium.org/310293002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@275505 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 260399 "Temporary CHECK version 2 in IPC::Channel::Send()..."viettrungluu@chromium.org2014-03-301-2/+0
| | | | | | | | | | | | | | | > Temporary CHECK version 2 in IPC::Channel::Send() to help track down crash. > > TBR=sievers@chromium.org, cpu@chromium.org > BUG=357915 > > Review URL: https://codereview.chromium.org/218433002 TBR=viettrungluu@chromium.org Review URL: https://codereview.chromium.org/216933007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@260419 0039d316-1c4b-4281-b951-d872f2087c98
* Temporary CHECK version 2 in IPC::Channel::Send() to help track down crash.viettrungluu@chromium.org2014-03-291-0/+2
| | | | | | | | | TBR=sievers@chromium.org, cpu@chromium.org BUG=357915 Review URL: https://codereview.chromium.org/218433002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@260399 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 260373 "Add a temporary CHECK to IPC::Channel::Send() to ..."viettrungluu@chromium.org2014-03-291-1/+0
| | | | | | | | | | | | | | | > Add a temporary CHECK to IPC::Channel::Send() to help track down crash. > > TBR=cbentzel@chromium.org, cpu@chromium.org > BUG=357915 > > Review URL: https://codereview.chromium.org/216293008 TBR=viettrungluu@chromium.org Review URL: https://codereview.chromium.org/217323004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@260393 0039d316-1c4b-4281-b951-d872f2087c98
* Add a temporary CHECK to IPC::Channel::Send() to help track down crash.viettrungluu@chromium.org2014-03-291-0/+1
| | | | | | | | | TBR=cbentzel@chromium.org, cpu@chromium.org BUG=357915 Review URL: https://codereview.chromium.org/216293008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@260373 0039d316-1c4b-4281-b951-d872f2087c98
* Changing a DCHECK to a CHECK in order to catch this error in release builds.tommi@chromium.org2014-01-211-1/+1
| | | | | | | | | | | | | | | | | I managed to hit this problem locally by following reproduction steps in bug 335031. My guess is that this might be causing data corruption and several so-far unexplained crashes, so I think that a reasonable first step is to upgrade the DCHECK to a CHECK. Committing as TBR to get this in asap. BUG=335031 TBR=agl@chromium.org NOTRY=True Review URL: https://codereview.chromium.org/143443002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@246036 0039d316-1c4b-4281-b951-d872f2087c98
* Update uses of UTF conversions in courgette/, device/, extensions/, ↵avi@chromium.org2013-12-251-2/+2
| | | | | | | | | | | | google_apis/, gpu/, ipc/, media/, net/ to use the base:: namespace. BUG=330556 TEST=no change TBR=ben@chromium.org Review URL: https://codereview.chromium.org/112963005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@242496 0039d316-1c4b-4281-b951-d872f2087c98
* Add base:: to string16s in ipc/.dbeam@chromium.org2013-12-201-2/+2
| | | | | | | | | R=tsepez@chromium.org BUG=329295 Review URL: https://codereview.chromium.org/108793005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@242050 0039d316-1c4b-4281-b951-d872f2087c98
* Revert https://src.chromium.org/viewvc/chrome?view=rev&revision=231330bbudge@chromium.org2013-11-041-1/+2
| | | | | | | | | | This is a speculative revert to see if it's the cause of hanging renderers. BUG=313112 Review URL: https://codereview.chromium.org/57783006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@232819 0039d316-1c4b-4281-b951-d872f2087c98
* Remove unused IPC::Message priority.bbudge@chromium.org2013-10-281-2/+1
| | | | | | | | | | | | | | | | | Removes the PriorityValue enum and field from IPC::Message. This doesn't appear to be used anywhere. Changes the data message ctor to take a size_t data_len parameter. This works around an ambiguity problem with the main ctor, which has a similar signature and would require lots of futzing with our test code to fix. To make this work, the matching Pickle constructor is also changed to take a size_t data_len parameter. BUG=194304 Review URL: https://codereview.chromium.org/35643005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@231330 0039d316-1c4b-4281-b951-d872f2087c98
* Alternative workaround for mac kernel bug.hubbe@chromium.org2013-10-151-1/+2
| | | | | | | | | | BUG=298276 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=227999 Review URL: https://codereview.chromium.org/25325002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@228569 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 227999 "Alternative workaround for mac kernel bug."benwells@chromium.org2013-10-111-2/+1
| | | | | | | | | | | | | | | | | > Alternative workaround for mac kernel bug. > > BUG=298276 > > Review URL: https://codereview.chromium.org/25325002 This change seemed to cause the Mac ASAN bot to timeout when running the ipc_tests. TBR=hubbe@chromium.org Review URL: https://codereview.chromium.org/26384003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@228110 0039d316-1c4b-4281-b951-d872f2087c98
* Alternative workaround for mac kernel bug.hubbe@chromium.org2013-10-101-1/+2
| | | | | | | | BUG=298276 Review URL: https://codereview.chromium.org/25325002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@227999 0039d316-1c4b-4281-b951-d872f2087c98
* Update include paths in ipc for base/process changes.rsesek@chromium.org2013-07-241-1/+1
| | | | | | | | | BUG=242290 R=cpu@chromium.org Review URL: https://chromiumcodereview.appspot.com/19525007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@213349 0039d316-1c4b-4281-b951-d872f2087c98
* Use a direct include of strings headers in ipc/, jingle/, media/.avi@chromium.org2013-06-111-1/+1
| | | | | | | | | | BUG=247723 TEST=none TBR=ben@chromium.org Review URL: https://chromiumcodereview.appspot.com/16684003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@205436 0039d316-1c4b-4281-b951-d872f2087c98
* Use a direct include of utf_string_conversions.h in google_apis/, gpu/, ↵avi@chromium.org2013-06-071-1/+1
| | | | | | | | | | | | ipc/, media/, ppapi/, printing/, remoting/, rlz/, skia/, sql/, sync/, third_party/, tools/, webkit/, win8/. BUG=none TEST=none TBR=ben@chromium.org Review URL: https://chromiumcodereview.appspot.com/15995038 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@204967 0039d316-1c4b-4281-b951-d872f2087c98
* base: Remove ALLOW_THIS_IN_INITIALIZER_LIST macro.tfarina@chromium.org2013-05-011-1/+1
| | | | | | | | | | | | All the usages were fixed in past revisions and the remaining usages were fixed within this patch. BUG=234765 TBR=darin@chromium.org Review URL: https://codereview.chromium.org/14657004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@197671 0039d316-1c4b-4281-b951-d872f2087c98
* ipc: Use base::MessageLoop.xhwang@chromium.org2013-04-301-10/+14
| | | | | | | | | BUG=236029 R=agl@chromium.org Review URL: https://chromiumcodereview.appspot.com/14383024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@197465 0039d316-1c4b-4281-b951-d872f2087c98
* ipc: Remove use of ALLOW_THIS_IN_INITIALIZER_LIST.scherkus@chromium.org2013-04-261-2/+2
| | | | | | | | | | It's no longer providing value as the MSVC warning is disabled during compilation. Refer to bug for details. BUG=234765 Review URL: https://chromiumcodereview.appspot.com/14261019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@196807 0039d316-1c4b-4281-b951-d872f2087c98
* Remove IPC::Channel::set_listener().viettrungluu@chromium.org2013-01-161-4/+0
| | | | | | | | | | It wasn't used anywhere other than in ipc_perftests (which, up till very recently, weren't even compiled) in a non-essential way. Review URL: https://chromiumcodereview.appspot.com/11964002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@177192 0039d316-1c4b-4281-b951-d872f2087c98
* Windows: Do not handle async read completions on IPC channel while the ↵apatrick@chromium.org2013-01-151-1/+1
| | | | | | | | | | | | channel is being closed. This resulted in messages being dispatched to objects while they were closing the IPC channel, potentially when they were in a partially destroyed state, leading to a crash. BUG=165269 Review URL: https://chromiumcodereview.appspot.com/11840003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@176818 0039d316-1c4b-4281-b951-d872f2087c98
* Remove IPC::MessageIterator.viettrungluu@chromium.org2012-12-171-5/+13
| | | | | | | | | | It's a rarely-used and completely unnecessary (and thin) wrapper around PickleIterator. Review URL: https://chromiumcodereview.appspot.com/11570038 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@173525 0039d316-1c4b-4281-b951-d872f2087c98
* [base] Move AutoReset to base namespace.dbeam@chromium.org2012-11-211-1/+2
| | | | | | | | | | | NOTRY=true R=darin@chromium.org BUG=None Review URL: https://chromiumcodereview.appspot.com/11308132 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@168978 0039d316-1c4b-4281-b951-d872f2087c98
* ipc: Remove ipc_listener.h from ipc_channel.h and update the files.tfarina@chromium.org2012-11-171-0/+1
| | | | | | | | | | | Note: This was a TODO for brett in ipc_channel.h TBR=cpu@chromium.org Review URL: https://chromiumcodereview.appspot.com/11308082 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@168458 0039d316-1c4b-4281-b951-d872f2087c98
* Trace PostTasks from post to run.jbates@chromium.org2012-09-181-1/+1
| | | | | | | | | | | | To do this properly, we need a new type of trace event "FLOW" which will be drawn as lines in about:tracing from BEGIN to END. Also instruments SequencedWorkerPool and ChannelReader::DispatchInputData, which were not currently traced. BUG=79942 Review URL: https://codereview.chromium.org/10913242 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@157288 0039d316-1c4b-4281-b951-d872f2087c98
* Add async trace events to trace progress of IPC messagesjbates@chromium.org2012-09-041-0/+1
| | | | | | | | BUG=79942 Review URL: https://chromiumcodereview.appspot.com/10919023 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@154840 0039d316-1c4b-4281-b951-d872f2087c98
* Use base::ThreadChecker as a member var, rather than base::NonThreadSafersleevi@chromium.org2012-06-251-2/+2
| | | | | | | | | | BUG=123295 TEST=existing Review URL: https://chromiumcodereview.appspot.com/10663016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@144011 0039d316-1c4b-4281-b951-d872f2087c98
* PPAPI/NaCl: Fix leaky NaClIPCAdapter test.dmichael@chromium.org2012-05-161-1/+2
| | | | | | | | | | | | The NaClIPCAdapter was not leaking, but the Channel deletion is posted as a task that the test was not running. This makes all the NaClIPCAdapter test cases do RunAllPending on shutdown to delete stuff. Unfortunately, one of the tests results in calling "Close()" on the channel in one of these tasks, and that fails for IPC::TestSink, because IPC::Channel::Close dereferences channel_impl_ unconditionally, and the channel_impl_ is NULL for TestSink. So this patch also makes Channel::Close() do nothing if channel_impl_ is NULL. BUG=127954 TEST= Review URL: https://chromiumcodereview.appspot.com/10383167 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@137471 0039d316-1c4b-4281-b951-d872f2087c98
* Fix ipc_channel_win logging for failed pipe creation.bryner@chromium.org2012-05-061-1/+1
| | | | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/10378022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@135607 0039d316-1c4b-4281-b951-d872f2087c98
* Make IPC channels track their peer process IDjschuh@chromium.org2012-04-051-0/+6
| | | | | | | | | | BrokerDuplicateHandle() requires the target process ID on Windows. Rather than plumb this into every channel class independently, I'm adding it at the top. TEST=IPCSyncChannelTest.Verified Review URL: http://codereview.chromium.org/9968111 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@130817 0039d316-1c4b-4281-b951-d872f2087c98
* Require IPC hello for a verified channeljschuh@chromium.org2012-04-031-1/+5
| | | | | | | | | BUG=117627 TEST=IPCSyncChannelTest.Verified Review URL: http://codereview.chromium.org/9956085 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@130346 0039d316-1c4b-4281-b951-d872f2087c98
* Verify the child process with a secret hellojschuh@chromium.org2012-03-171-9/+60
| | | | | | | | | BUG=117627 TEST=IPCSyncChannelTest.Verified Review URL: http://codereview.chromium.org/9692035 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@127327 0039d316-1c4b-4281-b951-d872f2087c98
* Factor out the shared parts of IPC channel reading.brettw@chromium.org2012-03-081-77/+7
| | | | | | | | | | | | | This adds a new class+file ChannelReader that is responsible for management of the common parts of IPC channel reading. The existing platform-specific ChannelImpl classes derive from this and supply platform-specific reading features via virtual classes. This is to reduce code duplication between the Windows and Posix implementations of Channel. Review URL: http://codereview.chromium.org/9547009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@125597 0039d316-1c4b-4281-b951-d872f2087c98
* Refactoring on Windows IPC channel.brettw@chromium.org2012-03-031-84/+134
| | | | | | | | | | | | This makes the Windows IPC channel interface the same as I've created for the Posix one: http://codereview.chromium.org/9570001/ The core reading functions DispatchInputData, ProcessIncomingMessages, and the "hello" message handling are now identical. The follow-up step will be to merge these into a common IPCChannelReader base class and eliminate the duplicate code. Review URL: http://codereview.chromium.org/9568031 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@124848 0039d316-1c4b-4281-b951-d872f2087c98
* Initialize IPC:ChannelHandle from existing HANDLEamit@chromium.org2012-01-241-5/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1] Add a ctor to IPC:ChannelHandle that takes a pipe HANDLE. 2] Corresponding change in Channel::ChannelImpl::CreatePipe to attach to the given pipe instead of creating a new one. Being able to hand over a pipe handle to IPC::Channel in this way has other advantages such as using anonymous pipes and safer connections between process with different level of privileges. Here's how it can be done: Server Process: - Create a server pipe, anonymous pipe is fine too. - Server creates a client handle of pipe using CreateFile. - Use DuplicateHandle to duplicate this handle for the client process. - pass over the handle value to the client process, say using comman line. Client process: - Simply receive the handle from the server and hand it over to IPC:Channel using IPC::ChannelHandle. Apart from being more flexible, this is more secure as it removes the 'connection window' while using names. BUG=none TEST=none Review URL: http://codereview.chromium.org/9150030 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@118786 0039d316-1c4b-4281-b951-d872f2087c98
* base:Bind: Convert ipc/.jhawkins@chromium.org2011-11-121-3/+6
| | | | | | | | | | | BUG=none TEST=none R=csilv@chromium.org Review URL: http://codereview.chromium.org/8539036 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@109810 0039d316-1c4b-4281-b951-d872f2087c98
* Fix NamedProxyLauncher on windows. Wait for the named pipe to be connectable.kkania@chromium.org2011-08-091-1/+17
| | | | | | | | | | | Enable NamedInterfaceTest on windows. BUG=chromium-os:8515 TEST=none Review URL: http://codereview.chromium.org/7486007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@95957 0039d316-1c4b-4281-b951-d872f2087c98
* Remove non-default DACL on the Pipe creationcpu@chromium.org2011-05-061-96/+10
| | | | | | | | | | | | | | -Not needed -Interferes with sandbox propper brokering -Faster pipe creation Some other small cleaning done as well. BUG=none TEST= sufficient coverage with existing tests, chrome works. Review URL: http://codereview.chromium.org/6927070 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@84461 0039d316-1c4b-4281-b951-d872f2087c98
* Improving logging in /app, /base, /crypto and /ipc. Updating plain DCHECK() ↵kushi.p@gmail.com2011-04-281-1/+1
| | | | | | | | | | | usages for DCHECK_EQ/LE/GE() equivalents. BUG=58409 TEST=None Review URL: http://codereview.chromium.org/6880166 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@83362 0039d316-1c4b-4281-b951-d872f2087c98
* Clean up channel modesdmaclach@chromium.org2011-02-031-19/+5
| | | | | | | | | | | | Makes channel modes flags instead of a straight enum allowing us to check properties directly. BUG=none TEST=BUILD Review URL: http://codereview.chromium.org/6334061 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@73658 0039d316-1c4b-4281-b951-d872f2087c98
* Get service processes working on Mac and Linux.dmaclach@chromium.org2011-02-021-1/+1
| | | | | | | | | | | Service processes will now launch, and attach to ipc channels. BUG=NONE TEST=BUILD Review URL: http://codereview.chromium.org/6349029 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@73425 0039d316-1c4b-4281-b951-d872f2087c98
* Change size() function to return a size_t so that result size is not ↵mrossetti@chromium.org2011-01-281-1/+2
| | | | | | | | | | | inadvertently truncated. BUG=None TEST=Ran existing unit tests and trybots. Review URL: http://codereview.chromium.org/6386008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@73001 0039d316-1c4b-4281-b951-d872f2087c98
* Reland "Remove base/scoped_handle_win.h."tfarina@chromium.org2011-01-091-2/+3
| | | | | | | | | | | | | | | Fixed the problem with rlz library. Now should be fine to land this again. This reverts commit 3620d9501af7bff688862c54fdd60f7eb41797f3. Original Review URL: http://codereview.chromium.org/6126002/ BUG=None TEST=trybots Review URL: http://codereview.chromium.org/6110005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70861 0039d316-1c4b-4281-b951-d872f2087c98