summaryrefslogtreecommitdiffstats
path: root/chrome/common/ipc_channel_posix.cc
Commit message (Collapse)AuthorAgeFilesLines
* linux (and some posix): multiprocess plugins compiling.evan@chromium.org2009-04-231-2/+2
| | | | | | | | | | | | | | | | | | | The goal of this change is to *not* make any behavioral change, but to instead just get all the plugin-related files linking on Linux with a bunch of NOTIMPLEMENTED()s in the appropriate places. It's enormous enough already without any refactorings or new features. Changes include: - Lots of gcc warning fixes. - Use portable replacements for Windows-specific functions (_strdup, etc.). - Use TransportDIB instead of just shared memory in the plugin messaging. Note that this is not fleshed out on Linux and on Windows it just hacks in the existing handles so there should be no functional change. - Fix --plugin-launcher to use cross-platform APIs. Review URL: http://codereview.chromium.org/79020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14338 0039d316-1c4b-4281-b951-d872f2087c98
* Remove histogram connection to base classes in stats_counterjar@chromium.org2009-04-101-0/+1
| | | | | | | | | | | | | | | | Now that histograms move data from renderer to browser, there is less reason to connect to stats counters. Stats counters were using shared memory, and now they may plausibly use the histogram's IPC mechanism instead to move data to the browser. The first step is remove the inheritance, and teh next (plausible/future) step would be to implement counters as histograms with only one bucket. r=mbelshe Review URL: http://codereview.chromium.org/66029 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13544 0039d316-1c4b-4281-b951-d872f2087c98
* Revert "Move IPC code to ipc/"agl@chromium.org2009-04-031-0/+803
| | | | | | | 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-803/+0
| | | | | | | (No review URL: Rietvelt couldn't cope) git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13062 0039d316-1c4b-4281-b951-d872f2087c98
* Better IPC logging on POSIX:phajdan.jr@chromium.org2009-03-201-4/+4
| | | | | | | | | - enable one more point of logging - enable decoding of automation messages in log output Review URL: http://codereview.chromium.org/50058 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12211 0039d316-1c4b-4281-b951-d872f2087c98
* Linux: remove the use of UNIX_PATH_MAX for systems which don't have it.agl@chromium.org2009-03-171-19/+9
| | | | | | | | | | Not all kernel headers seem to include UNIX_PATH_MAX. Instead, use sizeof. Review URL: http://codereview.chromium.org/48047 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11821 0039d316-1c4b-4281-b951-d872f2087c98
* Use a dedicated command line flag for FIFO IPC channels on POSIX.phajdan.jr@chromium.org2009-02-271-1/+1
| | | | | | | | | | This fixes a problem I hit when porting startup_tests that the controlling startup_tests process didn't use FIFO, and the child chrome process did (and obviously they couldn't communicate). Review URL: http://codereview.chromium.org/27220 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10593 0039d316-1c4b-4281-b951-d872f2087c98
* POSIX: Rename DescriptorSet to FileDescriptorSetagl@chromium.org2009-02-121-9/+10
| | | | | | | This is just following up on a code review promise. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9676 0039d316-1c4b-4281-b951-d872f2087c98
* POSIX: Clean up DescriptorSetagl@chromium.org2009-02-121-2/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | In general, the IPC Message objects are const and the iterator state is a void* kept by the code which is doing the deserialisation. However, now that we have an array of file descriptors, the index of the next file descriptor is part of the iteration state and is kept /inside/ the Message (in the DescriptorSet). This means that it's a mutable member, which is never too nice and also, since the logging functions want to parse a message multiple times, we've had to turn off returning an error when one runs off the end of the array. Also, the Message copy constructor and assignment function alters the /source/ Message, by stealing all of its descriptors This patch encodes the index of each file descriptor on the wire. So the state is moved from inside the DescriptorSet into the serialised data. Additionally, the DescriptorSet is made into a lazyily created scoped_refptr, solving the problems with copying messages. Review URL: http://codereview.chromium.org/20275 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9644 0039d316-1c4b-4281-b951-d872f2087c98
* OSX: Workaround CMSG_FIRSTHDR bugagl@chromium.org2009-02-121-17/+41
| | | | | | | | | | | | | | | | | | | | | | | On OSX, CMSG_FIRSTHDR will return a pointer into the control buffer space when controllen == 0. We work around by testing for a non-zero controllen before trying to parse control messages. Test case: int main() { struct msghdr msg; msg.msg_control = &msg; msg.msg_controllen = 0; if (CMSG_FIRSTHDR(&msg)) printf("Bug found!\n"); } Review URL: http://codereview.chromium.org/21283 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9640 0039d316-1c4b-4281-b951-d872f2087c98
* POSIX: Transfer network data using shared memoryagl@chromium.org2009-02-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | This patch adds the long planned support for sharing memory on POSIX by transporting file descriptors. It largely builds on the shared memory cleanup work by jrg. We move FileDescriptor out of chrome/common/file_descriptor_posix.h and into base/file_descriptor_posix.h. Since all that's left in the chrome/common verion is the DescriptorSet, those files are renamed to descriptor_set.[h|cc]. The SharedMemoryHandle on POSIX then becomes a typedef to a FileDescriptor and thus can be serialised over IPC. After that, it's mostly a case of cleaning up those snippets of code which considered SharedMemoryHandles to be scaler values. Review URL: http://codereview.chromium.org/21208 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9580 0039d316-1c4b-4281-b951-d872f2087c98
* POSIX: fix file descriptor passingagl@chromium.org2009-02-101-1/+2
| | | | | | | | | The kernel sets msghdr.msg_controllen to the length of the received control data on successful return. Thus, we need to reset this variable to the length of the buffer before each call. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9471 0039d316-1c4b-4281-b951-d872f2087c98
* Mac + Linux build fix:agl@chromium.org2009-02-071-1/+1
| | | | | | | | | | | Linux: GCC warning appeared only in opt mode Mac: CMSG macros appear to be non-constant somehow. Bodge and fix later. Review URL: http://codereview.chromium.org/21157 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9370 0039d316-1c4b-4281-b951-d872f2087c98
* FileDescriptor: passing fds over IPCagl@chromium.org2009-02-071-4/+117
| | | | | | | | | This patch introduces a FileDescriptor object which can be included in IPC messages and will perform the magic needed to pass file descriptors over IPC. After some consideration, Windows will continue to do the current DuplicateHandle tricks. Review URL: http://codereview.chromium.org/20027 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9369 0039d316-1c4b-4281-b951-d872f2087c98
* Fix issue 7146, sending large messages over IPC on POSIX was broken.jeremy@chromium.org2009-01-291-3/+9
| | | | | | Review URL: http://codereview.chromium.org/19454 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8887 0039d316-1c4b-4281-b951-d872f2087c98
* Make CommandLine into a normal object, with some statics for getting at the ↵evan@chromium.org2009-01-211-1/+2
| | | | | | | | | | | current process's command line. One explicit goal of this change is to *not* deal with the string/wstring issues at the API on POSIX; the functions are the same as before, which means they remain as broken as before. (I did try to fix the internals, though, so migrating the callers is now possible by adding platform-appropriate hooks.) Review URL: http://codereview.chromium.org/18248 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8347 0039d316-1c4b-4281-b951-d872f2087c98
* POSIX: IPC channel changes needed to get IPC Sync Channel unittests running.agl@chromium.org2009-01-201-13/+99
| | | | | | | Review URL: http://codereview.chromium.org/18322 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8325 0039d316-1c4b-4281-b951-d872f2087c98
* Implement command line switch to allow using a FIFO or a socketpair() for ↵jeremy@chromium.org2008-12-191-13/+76
| | | | | | | | IPC on POSIX. Review URL: http://codereview.chromium.org/14863 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7319 0039d316-1c4b-4281-b951-d872f2087c98
* * Fix for one end of FIFO not being set as non-blocking. This fixes the IPC ↵jeremy@chromium.org2008-12-161-0/+4
| | | | | | | | | | fuzzing tests on Linux. * Enable fuzzing tests on Linux. Review URL: http://codereview.chromium.org/14484 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7100 0039d316-1c4b-4281-b951-d872f2087c98
* message_pump_libevent refactor:jeremy@chromium.org2008-12-151-72/+51
| | | | | | | | | | * Unify WatchSocket & WatchFileHandle. * Better encapsulate libevent. * Fix a bug with blocking writes in ipc_posix.cc Review URL: http://codereview.chromium.org/13757 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7010 0039d316-1c4b-4281-b951-d872f2087c98
* Reverting 6911.ojan@google.com2008-12-121-44/+65
| | | | | | Review URL: http://codereview.chromium.org/14068 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@6916 0039d316-1c4b-4281-b951-d872f2087c98
* message_pump_libevent refactor:jeremy@chromium.org2008-12-121-65/+44
| | | | | | | | | | * Unify WatchSocket & WatchFileHandle. * Better encapsulate libevent. * Fix a bug with blocking writes in ipc_posix.cc Review URL: http://codereview.chromium.org/13757 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@6911 0039d316-1c4b-4281-b951-d872f2087c98
* Build ipc_tests on linux.tc@google.com2008-12-111-1/+7
| | | | | | | Review URL: http://codereview.chromium.org/13366 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@6762 0039d316-1c4b-4281-b951-d872f2087c98
* Refactor IPC::Channel to have a common header.jeremy@chromium.org2008-12-101-29/+42
| | | | | | Review URL: http://codereview.chromium.org/11024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@6743 0039d316-1c4b-4281-b951-d872f2087c98
* First cut at POSIX Implementation of IPC Channel using FIFOs.jeremy@chromium.org2008-12-081-11/+483
| | | | | | | | | | The following work still remains: * Provide better encapsulation of libevent. * Use socketpair and use named FIFO code only when debugging. Review URL: http://codereview.chromium.org/12927 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@6520 0039d316-1c4b-4281-b951-d872f2087c98
* Try to reland the ipc code to see if the testsnsylvain@chromium.org2008-12-021-0/+32
| | | | | | | | | are going to break again. TBR:jeremy Review URL: http://codereview.chromium.org/13053 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@6222 0039d316-1c4b-4281-b951-d872f2087c98
* We have a bunch of new ui_tests failures. I wantnsylvain@chromium.org2008-12-021-32/+0
| | | | | | | | | | to check if this change (6181) was the cause. I'm reverting. TBR:jeremy Review URL: http://codereview.chromium.org/12856 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@6199 0039d316-1c4b-4281-b951-d872f2087c98
* * Add ipc_tests unittest target to xcode project.jeremy@chromium.org2008-12-011-0/+32
* Stub out ipc_channel_posix.cc to allow other code that depends on it to be compiled. * Cleanup some ipc code a bit to compile on gcc. * Remove unused IPC::Channel::ProcessPendingMessages() git-svn-id: svn://svn.chromium.org/chrome/trunk/src@6181 0039d316-1c4b-4281-b951-d872f2087c98