summaryrefslogtreecommitdiffstats
path: root/ipc/ipc_send_fds_test.cc
Commit message (Collapse)AuthorAgeFilesLines
* replace OVERRIDE and FINAL with override and final in ipc/mostynb2014-10-071-4/+4
| | | | | | | | BUG=417463 Review URL: https://codereview.chromium.org/633563002 Cr-Commit-Position: refs/heads/master@{#298413}
* Make IPC::Channel polymorphicmorrita@chromium.org2014-06-061-1/+2
| | | | | | | | | | | | | | 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
* Introduce IPC::Channel::Create*() to ensure it being heap-allocated.morrita@chromium.org2014-05-301-10/+6
| | | | | | | | | | | | | | | | | | | | | This change introduces IPC::Channel::Create*() API to turn IPC::Channel into a heap allocated object. This will allow us to make Channel a polymorphic class. This change also tries to hide Channel::Mode from public API so that we can simplify channel creation code paths cleaner in following changes. ChannelProxy has to follow same pattern to finish this cleanup. Such changes will follow. TEST=none BUG=377980 R=darin@chromium.org,cpu@chromium.org Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=273575 Review URL: https://codereview.chromium.org/307653003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@273713 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 273575 "Introduce IPC::Channel::Create*() to ensure it be..."mattm@chromium.org2014-05-291-6/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Broke win compile. > Introduce IPC::Channel::Create*() to ensure it being heap-allocated. > > This change introduces IPC::Channel::Create*() API to turn > IPC::Channel into a heap allocated object. This will allow us to > make Channel a polymorphic class. > > This change also tries to hide Channel::Mode from public API > so that we can simplify channel creation code paths cleaner in > following changes. ChannelProxy has to follow same pattern to > finish this cleanup. Such changes will follow. > > TEST=none > BUG=377980 > R=darin@chromium.org,cpu@chromium.org > > Review URL: https://codereview.chromium.org/307653003 TBR=morrita@chromium.org Review URL: https://codereview.chromium.org/304153005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@273596 0039d316-1c4b-4281-b951-d872f2087c98
* Introduce IPC::Channel::Create*() to ensure it being heap-allocated.morrita@chromium.org2014-05-291-10/+6
| | | | | | | | | | | | | | | | | | | This change introduces IPC::Channel::Create*() API to turn IPC::Channel into a heap allocated object. This will allow us to make Channel a polymorphic class. This change also tries to hide Channel::Mode from public API so that we can simplify channel creation code paths cleaner in following changes. ChannelProxy has to follow same pattern to finish this cleanup. Such changes will follow. TEST=none BUG=377980 R=darin@chromium.org,cpu@chromium.org Review URL: https://codereview.chromium.org/307653003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@273575 0039d316-1c4b-4281-b951-d872f2087c98
* Don't HANDLE_EINTR(close). Either IGNORE_EINTR(close) or just close.mark@chromium.org2013-12-031-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It is incorrect to wrap close in HANDLE_EINTR on Linux. Correctness is generally undefined on Mac, but as of r223369, it is incorrect in Chrome on Mac. To avoid new offenders, a PRESUBMIT check ensures that HANDLE_EINTR is not used with close, and that IGNORE_EINTR is only used with close. Unnecessary #includes of eintr_wrapper.h are also removed. base/posix/einter_wrapper.h, PRESUBMIT.py, and ppapi/tests/test_broker.cc contain non-mechanical changes. Variable naming within the latter is updated per r178174. Missing #includes for <errno.h> in content/zygote/zygote_main_linux.cc and tools/android/common/daemon.cc were manually added. Mechanical changes were generated by running: sed -E -i '' \ -e 's/((=|if|return|CHECK|EXPECT|ASSERT).*)HANDLE(_EINTR\(.*close)/\1IGNORE\3/' \ -e 's/(ignore_result|void ?)\(HANDLE_EINTR\((.*close\(.*)\)\)/\2/' \ -e 's/(\(void\) ?)?HANDLE_EINTR\((.*close\(.*)\)/\2/' \ $(git grep -El 'HANDLE_EINTR.*close') sed -E -i '' -e '/#include.*eintr_wrapper\.h"/d' \ $(grep -EL '(HANDLE|IGNORE)_EINTR' \ $(git grep -El '#include.*eintr_wrapper\.h"')) BUG=269623 R=agl@chromium.org, jln@chromium.org TBR=OWNERS Review URL: https://codereview.chromium.org/100253002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@238390 0039d316-1c4b-4281-b951-d872f2087c98
* Revert https://src.chromium.org/viewvc/chrome?view=rev&revision=231330bbudge@chromium.org2013-11-041-2/+4
| | | | | | | | | | 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-4/+2
| | | | | | | | | | | | | | | | | 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-29/+226
| | | | | | | | | | 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-226/+29
| | | | | | | | | | | | | | | | | > 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-29/+226
| | | | | | | | 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
* Use a direct include of the message_loop header in dbus/, device/, ↵avi@chromium.org2013-07-171-1/+1
| | | | | | | | | | | | extensions/, google_apis/, gpu/, ipc/, jingle/. BUG=260807 TEST=none TBR=ben@chromium.org Review URL: https://chromiumcodereview.appspot.com/19607005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@212157 0039d316-1c4b-4281-b951-d872f2087c98
* ipc: Use base::MessageLoop.xhwang@chromium.org2013-04-301-5/+5
| | | | | | | | | 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
* Linux/ChromeOS Chromium style checker cleanup, ipc/ edition.rsleevi@chromium.org2013-02-061-2/+2
| | | | | | | | | | | Automated clean up of style checker errors that were missed due to the plugin not being executed on implementation files. BUG=115047 Review URL: https://chromiumcodereview.appspot.com/12220032 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@180954 0039d316-1c4b-4281-b951-d872f2087c98
* Refactor (many) IPC tests, notably most of the multiprocess tests.viettrungluu@chromium.org2013-01-251-94/+72
| | | | | | | | | | | This factors out common code and, more importantly/usefully, makes test-specific code more local, and thus easier to add new tests and maintain existing ones. In particular, this allows you to add a new test "client" (running in another process) without modifying ipc_test_base.*. Review URL: https://codereview.chromium.org/12051048 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@178901 0039d316-1c4b-4281-b951-d872f2087c98
* More IPC test header cleanup.viettrungluu@chromium.org2013-01-151-1/+0
| | | | | | Review URL: https://codereview.chromium.org/11858023 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@176983 0039d316-1c4b-4281-b951-d872f2087c98
* Move IPC tests into anonymous namespaces.viettrungluu@chromium.org2013-01-111-2/+2
| | | | | | | | | This reduces chances of (very confusing) name collisions between different tests. Review URL: https://codereview.chromium.org/11865015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@176430 0039d316-1c4b-4281-b951-d872f2087c98
* Make ipc_tests file structure a little saner and add an ipc_perftests target.viettrungluu@chromium.org2013-01-111-5/+6
| | | | | | | | | | This means that the (one, semi-manual) IPC perf test that we have will build without manual hackery (and do so separately from the ipc_tests target). Review URL: https://chromiumcodereview.appspot.com/11819041 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@176341 0039d316-1c4b-4281-b951-d872f2087c98
* ipc: Remove ipc_listener.h from ipc_channel.h and update the files.tfarina@chromium.org2012-11-171-1/+2
| | | | | | | | | | | 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
* Move eintr_wrapper.h from base to base/posixbrettw@chromium.org2012-11-141-1/+1
| | | | | | Review URL: https://codereview.chromium.org/11366229 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@167739 0039d316-1c4b-4281-b951-d872f2087c98
* Switch to TimeDelta interfaces for process waiting functions in net and ipc.tedvessenes@gmail.com2012-07-111-1/+2
| | | | | | | | | | R=agl@chromium.org BUG=108171 Review URL: https://chromiumcodereview.appspot.com/10692155 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@146124 0039d316-1c4b-4281-b951-d872f2087c98
* Remove Message::Sender and Channel::Listener typedefs.brettw@chromium.org2012-06-291-1/+1
| | | | | | | | | | | This patch fixes the remaining users to use the new names for these classes. BUG= TEST= Review URL: https://chromiumcodereview.appspot.com/10698057 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@145005 0039d316-1c4b-4281-b951-d872f2087c98
* Make GlobalDescriptors::MaybeGet return -1 when the key is not found.jcivelli@chromium.org2012-06-271-2/+3
| | | | | | | | | | BUG=None TEST=Unit tests should still pass. Review URL: https://chromiumcodereview.appspot.com/10387218 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@144350 0039d316-1c4b-4281-b951-d872f2087c98
* Refactor Pickle Read methods to use higher performance PickleIterator.jbates@chromium.org2012-03-071-2/+2
| | | | | | | | | | | | | | | | There was a lot of redundant error checking and initialization code in all Pickle Read methods because of the void** iterator type. This change replaces the void* iterator with PickleIterator, which encapsulates the read pointer so that less error checking and initialization code is needed for reading. PickleIterator has all the necessary data to do the actual reading. The advantage of having it provide Read methods (as opposed to leaving them solely in the Pickle interface) is that the callers do not need to pass around the const Pickle* once they have a PickleIterator. Followup CLs will refactor the call sites to remove const Pickle* arguments where they are now unnecessary. Then the Pickle::Read* methods can be removed entirely. The alternative approach would have been to change the Pickle::Read methods to non-const and remove the iterator parameter (making Read methods advance an internal read pointer). Unfortunately, the const Read with iterator design is entrenched throughout the chromium code, making this a much more complex change with the same performance outcome. BUG=13108 Review URL: https://chromiumcodereview.appspot.com/9447084 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@125447 0039d316-1c4b-4281-b951-d872f2087c98
* Make IPC::Channel::Listener:OnMessageReceived have a return value indicating ↵jam@chromium.org2010-12-241-4/+4
| | | | | | | | | whether a message was processed or not. TBR=brettw Review URL: http://codereview.chromium.org/5978003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70139 0039d316-1c4b-4281-b951-d872f2087c98
* Verify file descriptor count.dmaclach@chromium.org2010-12-091-1/+12
| | | | | | | | | | | Tighten up test by verifying that the number of descriptors received was what we expected and that we didn't exit the message loop due to channel closing unexpectedly. BUG=none TEST=build Review URL: http://codereview.chromium.org/5518007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@68683 0039d316-1c4b-4281-b951-d872f2087c98
* ipc_channel: warn if someone forgets to check the result of Connect()evan@chromium.org2010-10-191-3/+3
| | | | | | | | I found a test that was doing this. Review URL: http://codereview.chromium.org/3759004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@63083 0039d316-1c4b-4281-b951-d872f2087c98
* clang/mac: Fix almost all problems when building all.xcodeproj.thakis@chromium.org2010-10-041-1/+3
| | | | | | | | BUG=None TEST=None TBR=hans git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61344 0039d316-1c4b-4281-b951-d872f2087c98
* Handle return value from HANDLE_EINTR in ipc_send_fds_test.cc.hans@chromium.org2010-09-161-1/+1
| | | | | | | | | | | Clang complains about this unused return value. BUG=none TEST=none Review URL: http://codereview.chromium.org/3317020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@59623 0039d316-1c4b-4281-b951-d872f2087c98
* Re-land part of r55416, minus actually moving the test_suite.h contents to a ↵brettw@chromium.org2010-08-171-0/+1
| | | | | | | | | | | | | | | | | | | | | | | .cc file. Cleanup in base. This moves the implementation (and a bunch of header file dependencies) from the multiprocess test and the test_suite headers to .cc files. Moves multiprocess_test to the test directory, and all of this stuff to the existing base_test_support project. I also used the base namespace. Previously other projects included this functionality just by #include because it was all inline, so I had to add dependencies on base_test_support in a few places. Moves and renames the command line switch this was using to base_switches. Move the base switch for process type to chrome switches. TEST=none BUG=none Review URL: http://codereview.chromium.org/3026055 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@56399 0039d316-1c4b-4281-b951-d872f2087c98
* Reapplies all the IPC system work (reverts the revert r56272).erg@google.com2010-08-171-0/+1
| | | | | | | | | | | That patch wasn't what caused the regression in the page cycler. BUG=51411,52103 TEST=still compiles Review URL: http://codereview.chromium.org/3106018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@56390 0039d316-1c4b-4281-b951-d872f2087c98
* Completely revert all my IPC work to see if this was what regressed the page ↵erg@google.com2010-08-171-1/+0
| | | | | | | | | | | cycler. BUG=51411,52103 TEST=page cycler Review URL: http://codereview.chromium.org/3170020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@56272 0039d316-1c4b-4281-b951-d872f2087c98
* FBTF: Remove all the easy headers from *_messages.h.erg@google.com2010-08-121-0/+1
| | | | | | | | | BUG=51411 TEST=compiles Review URL: http://codereview.chromium.org/3174002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@55902 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 55400 - Cleanup in base. This moves the implementation (and a bunch ↵nsylvain@chromium.org2010-08-091-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | of header file dependencies) from the multiprocess test and the test_suite headers to .cc files. Moves multiprocess_test to the test directory, and all of this stuff to the existing base_test_support project. I also used the base namespace. Previously other projects included this functionality just by #include because it was all inline, so I had to add dependencies on base_test_support in a few places. Moves and renames the command line switch this was using to base_switches. Move the base switch for process type to chrome switches. TEST=none BUG=none Review URL: http://codereview.chromium.org/3026055 TBR=brettw@chromium.org Review URL: http://codereview.chromium.org/3035062 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@55416 0039d316-1c4b-4281-b951-d872f2087c98
* Cleanup in base. This moves the implementation (and a bunch of header filebrettw@chromium.org2010-08-091-0/+1
| | | | | | | | | | | | | | | | | | | dependencies) from the multiprocess test and the test_suite headers to .cc files. Moves multiprocess_test to the test directory, and all of this stuff to the existing base_test_support project. I also used the base namespace. Previously other projects included this functionality just by #include because it was all inline, so I had to add dependencies on base_test_support in a few places. Moves and renames the command line switch this was using to base_switches. Move the base switch for process type to chrome switches. TEST=none BUG=none Review URL: http://codereview.chromium.org/3026055 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@55400 0039d316-1c4b-4281-b951-d872f2087c98
* Split the IPC code into ipc/agl@chromium.org2009-07-221-0/+187
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This splits the ipc code from the common project. The 'common' project pulls in all of webkit, the v8 bindings, skia, googleurl, and a number of other projects which makes it very difficult to deal with especially for external projects wanting just to use some of Chromium's infrastructure. This puts the ipc code into its top-level ipc/ directory with a dependency only on base. The common project depends on the new ipc/ipc.gyp:ipc target so that all projects currently pulling common in to get the IPC code still have it available. This mostly follows agl's pre-gyp attempt to do this which was r13062. Known issues: - Currently a number of projects depend on chrome/chrome.gyp:common in order to use the IPC infrastructure. Rather than fixing all of these dependencies I have made common depend on ipc/ipc.gyp:ipc and added "ipc" to the include_rules section of DEPS so that checkdeps.py doesn't complain. Over time projects that need IPC should depend on the IPC project themselves and dependencies on common removed, although I don't think many projects that need IPC will be able to get away without common currently. - ipc/ipc_message_macros.h still has #include "chrome/common/..." inside of a ipc/ should not refer to files in chrome/... now. I'm not sure how to resolve this since it's really an IDE bug - the named pipe name (windows+linux) and the logging event name (all) + env variable (posix) refer explicitly to 'Chrome' which somewhat hurts the illusion of ipc/ being an independent library. I think this should be examined in a subsequent, much smaller patch. - I've eliminated the IPC.SendMsgCount counter since it was implemented in a way to create a dependency from ipc/ to chrome/common/chrome_counters. This is the same approach that r13062 took. http://codereview.chromium.org/155905 (Patch from James Robinson) git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21342 0039d316-1c4b-4281-b951-d872f2087c98
* Revert "Move IPC code to ipc/"agl@chromium.org2009-04-031-186/+0
| | | | | | | This reverts commit r13062 which, unsurprisingly, broke the build. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13063 0039d316-1c4b-4281-b951-d872f2087c98
* Move IPC code to ipc/agl@chromium.org2009-04-031-0/+186
(No review URL: Rietvelt couldn't cope) git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13062 0039d316-1c4b-4281-b951-d872f2087c98