summaryrefslogtreecommitdiffstats
path: root/ipc/file_descriptor_set_posix_unittest.cc
Commit message (Collapse)AuthorAgeFilesLines
* IPC: Get rid of FileDescriptor usage from FileDescriptorSet and Messagemorrita2014-09-241-36/+42
| | | | | | | | | | | | | | | This is a step toward to killing FileDescriptor. This change lets FiileDescriptorSet have both Files (for owning fds) and PlatformFiles (for non-owning fds). Doing this, we no longer need FileDescriptor which provides |auto_close| flag. BUG=415294 TEST=ipc_tests, ipc_mojo_unittests R=agl@chromium.org, jam@hcromium.org, viettrungluu@chromium.org Review URL: https://codereview.chromium.org/583473002 Cr-Commit-Position: refs/heads/master@{#296498}
* Don't HANDLE_EINTR(close). Either IGNORE_EINTR(close) or just close.mark@chromium.org2013-12-031-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* 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
* Convert some constants declared as anonymous enums into static consts so ↵pkasting@chromium.org2011-09-011-4/+2
| | | | | | | | | | | | | | they have types. This defines the constants where they're declared to preserve the existing readability as well as allow us to do things like dimension arrays based on the values of the constants. The drawback to defining constants at their declaration point is that supplying them to a templated function, like what DCHECK_EQ() expands into, triggers an "undefined symbol" error on Mac/Linux (and adding explicit storage for them in the .cc file can cause duplicate symbol errors on Windows). Here I've worked around that by converting DCHECK_EQ(a, b) to DCHECK(b == a). The original motiviation for this change was to find a way to eliminate some cases of passing anonymous-typed values as template arguments (which happens when you use a value from the enum in e.g. EXPECT_EQ()), which is technically illegal in C++03, though we don't warn about it. Simply naming the enum would have done this, but in general naming enums used to declare constants like this is bizarre ("enum Constants { ... }"?). BUG=92247 TEST=Compiles Review URL: http://codereview.chromium.org/7817005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@99087 0039d316-1c4b-4281-b951-d872f2087c98
* Add support for sockets that can listen and accept a connection.dmaclach@chromium.org2010-12-201-1/+2
| | | | | | | | | | | | | | | | | | | | | These sockets allow one connection at a time, however clients can connect and disconnect repeatedly. These are going to be used by Cloud Print, Remoting and Automation. BUG=NONE TEST=BUILD Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=69660 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=69690 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=69694 Review URL: http://codereview.chromium.org/5749001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@69696 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 69694 - Add support for sockets that can listen and accept a connection.dmaclach@chromium.org2010-12-201-2/+1
| | | | | | | | | | | | | | | | | | | | | | These sockets allow one connection at a time, however clients can connect and disconnect repeatedly. These are going to be used by Cloud Print, Remoting and Automation. BUG=NONE TEST=BUILD Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=69660 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=69690 Review URL: http://codereview.chromium.org/5749001 TBR=dmaclach@chromium.org Review URL: http://codereview.chromium.org/6060002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@69695 0039d316-1c4b-4281-b951-d872f2087c98
* Add support for sockets that can listen and accept a connection.dmaclach@chromium.org2010-12-201-1/+2
| | | | | | | | | | | | | | | | | | | These sockets allow one connection at a time, however clients can connect and disconnect repeatedly. These are going to be used by Cloud Print, Remoting and Automation. BUG=NONE TEST=BUILD Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=69660 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=69690 Review URL: http://codereview.chromium.org/5749001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@69694 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 69690 - Add support for sockets that can listen and accept a connection.dmaclach@chromium.org2010-12-201-2/+1
| | | | | | | | | | | | | | | | | | | | These sockets allow one connection at a time, however clients can connect and disconnect repeatedly. These are going to be used by Cloud Print, Remoting and Automation. BUG=NONE TEST=BUILD Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=69660 Review URL: http://codereview.chromium.org/5749001 TBR=dmaclach@chromium.org Review URL: http://codereview.chromium.org/5972002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@69691 0039d316-1c4b-4281-b951-d872f2087c98
* Add support for sockets that can listen and accept a connection.dmaclach@chromium.org2010-12-201-1/+2
| | | | | | | | | | | | | | | | | These sockets allow one connection at a time, however clients can connect and disconnect repeatedly. These are going to be used by Cloud Print, Remoting and Automation. BUG=NONE TEST=BUILD Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=69660 Review URL: http://codereview.chromium.org/5749001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@69690 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 69660 - Add support for sockets that can listen and accept a connection.dmaclach@chromium.org2010-12-181-2/+1
| | | | | | | | | | | | | | | | | | These sockets allow one connection at a time, however clients can connect and disconnect repeatedly. These are going to be used by Cloud Print, Remoting and Automation. BUG=NONE TEST=BUILD Review URL: http://codereview.chromium.org/5749001 TBR=dmaclach@chromium.org Review URL: http://codereview.chromium.org/6045002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@69662 0039d316-1c4b-4281-b951-d872f2087c98
* Add support for sockets that can listen and accept a connection.dmaclach@chromium.org2010-12-181-1/+2
| | | | | | | | | | | | | | | These sockets allow one connection at a time, however clients can connect and disconnect repeatedly. These are going to be used by Cloud Print, Remoting and Automation. BUG=NONE TEST=BUILD Review URL: http://codereview.chromium.org/5749001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@69660 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 69264 - Add support for sockets that can listen and accept a connection.dmaclach@chromium.org2010-12-161-2/+1
| | | | | | | | | | | | | | | | | | These sockets allow one connection at a time, however clients can connect and disconnect repeatedly. These are going to be used by Cloud Print, Remoting and Automation. BUG=NONE TEST=BUILD Review URL: http://codereview.chromium.org/5749001 TBR=dmaclach@chromium.org Review URL: http://codereview.chromium.org/5943002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@69361 0039d316-1c4b-4281-b951-d872f2087c98
* Add support for sockets that can listen and accept a connection.dmaclach@chromium.org2010-12-151-1/+2
| | | | | | | | | | | | | | | These sockets allow one connection at a time, however clients can connect and disconnect repeatedly. These are going to be used by Cloud Print, Remoting and Automation. BUG=NONE TEST=BUILD Review URL: http://codereview.chromium.org/5749001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@69264 0039d316-1c4b-4281-b951-d872f2087c98
* Convert implicit scoped_refptr constructor calls to explicit ones, part 1thakis@chromium.org2010-11-011-10/+10
| | | | | | | | | | | This CL was created automatically by this clang rewriter: http://codereview.appspot.com/2776043/ . I manually fixed a few rough spots of the rewriter output (doh1-3) and fixed all presubmit errors. BUG=28083 TEST=None Review URL: http://codereview.chromium.org/4192012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@64573 0039d316-1c4b-4281-b951-d872f2087c98
* Handle return value from HANDLE_EINTR in file_descriptor_set_posix_unittest.cc.hans@chromium.org2010-09-171-2/+2
| | | | | | | | | | | Clang complains about this unused return value. BUG=none TEST=none Review URL: http://codereview.chromium.org/3328017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@59791 0039d316-1c4b-4281-b951-d872f2087c98
* Build fix: I incorrectly applied r21399 from a patch.agl@chromium.org2009-07-231-0/+178
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21402 0039d316-1c4b-4281-b951-d872f2087c98