summaryrefslogtreecommitdiffstats
path: root/ipc/ipc_channel.h
Commit message (Collapse)AuthorAgeFilesLines
* Remove IPC::Channel::TakePipeHandle()morrita2014-09-251-5/+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}
* Add ipc_mojo_perftestsmorrita2014-09-091-1/+1
| | | | | | | | | | | | | | | | This change adds ipc_mojo_perftests that runs the same benchmark as of ipc_perftests. Now head-to-head comparison becomes possible. For this change, whole ipc_perftests logic is extracted to ipc_perftest_support.cc to make it reusable by ipc_mojo_perftests. TEST=none BUG=none R=jam@chromium.org, darin@chromium.org, yuzhu@chromium.org Review URL: https://codereview.chromium.org/536213002 Cr-Commit-Position: refs/heads/master@{#293988}
* Introduce ChannelMojomorrita@chromium.org2014-08-041-0/+8
| | | | | | | | | | | | | | | | | | 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::Channel: Reduce POSIX specific API surfacemorrita@chromium.org2014-06-071-20/+0
| | | | | | | | | | | | | | | This change is a simple cleanup: It removes some Channel API that is only used only in POSIX specific tests. These funtions still live in ChannelPosix. POSIX speicific tests now touch ChannelPosix instead of its superclass Channel. TEST=none R=darin@chromium.org, jam@chromium.org BUG=377980 Review URL: https://codereview.chromium.org/320433002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@275632 0039d316-1c4b-4281-b951-d872f2087c98
* Make IPC::Channel polymorphicmorrita@chromium.org2014-06-061-26/+13
| | | | | | | | | | | | | | 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-14/+43
| | | | | | | | | | | | | | | | | | | | | 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-43/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-14/+43
| | | | | | | | | | | | | | | | | | | 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
* IPC: Make ipc_perftests run on Android.epenner@chromium.org2014-03-191-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | There was several minor issues: - Base perf logging file location was off-limits on Android - Printf needs to be flushed to be visible on Android. - Android needs to reset the 'PipeMap' manually since we can't 'exec' after forking a test process. If we don't do this the Channel thinks we are in a single- process test and tries to open an FD which was closed during forking. - Android's base file descriptor needs to be increased to prevent stomping the android native logging file-descriptor with the default pipe. - The test took too long, so the 'exponent' is reduced from 5 to 3 - We need an APK With this patch the test runs like on other platforms, and lots of testing code is fixed such that it works the same way on all platforms. BUG=345471 Review URL: https://codereview.chromium.org/196343019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@257877 0039d316-1c4b-4281-b951-d872f2087c98
* Connect PPAPI IPC channels for non-SFI mode.hidehiko@chromium.org2014-02-211-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | By this CL, plugin starts to talk with hosts via IPC. For that purpose, ppapi_proxy is linked to nacl_helper (temporarily). This increase the size of nacl_helper, but when we split nacl_helper for non-sfi mode, it'll be resolved. In SFI mode, this CL shouldn't affect the concept of IPC channel connection between the plugin and the hosts. We still use NaClIPCAdapter to wrap the IPC channel, and NaClDesc for the plugin-side IPC file descriptors. In non-SFI mode, we neither intercept nor rewrite the message using NaClIPCAdapter, and the channels are connected between the plugin and the hosts directly. Note: plugin_main_nacl.cc is renamed to plugin_main.cc, because files with _nacl.cc suffix are automatically excluded from the sources of non-untrusted libs. This increases the size of nacl_helper (temporarily) intentionally. GYP_DEFINES="target_arch=ia32 remove_webcore_debug_symbols=1 linux_strip_symbols=1" GYP_GENERATORS="ninja" gclient runhooks Before: text data bss dec hex filename 1469882 15576 108644 1594102 1852f6 out/Release/nacl_helper After: text data bss dec hex filename 5641443 124636 126980 5893059 59ebc3 out/Release/nacl_helper GYP_DEFINES="target_arch=x64 remove_webcore_debug_symbols=1 linux_strip_symbols=1" GYP_GENERATORS="ninja" gclient runhooks Before: text data bss dec hex filename 2063530 27910 213872 2305312 232d20 out/Release/nacl_helper After: text data bss dec hex filename 6304467 234424 247984 6786875 678f3b out/Release/nacl_helper BUG=https://code.google.com/p/nativeclient/issues/detail?id=3734 TEST=Ran trybot. Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=252503 Review URL: https://codereview.chromium.org/140573003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@252556 0039d316-1c4b-4281-b951-d872f2087c98
* Revert "Connect PPAPI IPC channels for non-SFI mode."loislo@chromium.org2014-02-211-6/+0
| | | | | | This reverts commit 3d41a2a63bbd307fcee6e6c5547ce5fe29e2f4a5. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@252506 0039d316-1c4b-4281-b951-d872f2087c98
* Connect PPAPI IPC channels for non-SFI mode.hidehiko@chromium.org2014-02-211-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | By this CL, plugin starts to talk with hosts via IPC. For that purpose, ppapi_proxy is linked to nacl_helper (temporarily). This increase the size of nacl_helper, but when we split nacl_helper for non-sfi mode, it'll be resolved. In SFI mode, this CL shouldn't affect the concept of IPC channel connection between the plugin and the hosts. We still use NaClIPCAdapter to wrap the IPC channel, and NaClDesc for the plugin-side IPC file descriptors. In non-SFI mode, we neither intercept nor rewrite the message using NaClIPCAdapter, and the channels are connected between the plugin and the hosts directly. Note: plugin_main_nacl.cc is renamed to plugin_main.cc, because files with _nacl.cc suffix are automatically excluded from the sources of non-untrusted libs. This increases the size of nacl_helper (temporarily) intentionally. GYP_DEFINES="target_arch=ia32 remove_webcore_debug_symbols=1 linux_strip_symbols=1" GYP_GENERATORS="ninja" gclient runhooks Before: text data bss dec hex filename 1469882 15576 108644 1594102 1852f6 out/Release/nacl_helper After: text data bss dec hex filename 5641443 124636 126980 5893059 59ebc3 out/Release/nacl_helper GYP_DEFINES="target_arch=x64 remove_webcore_debug_symbols=1 linux_strip_symbols=1" GYP_GENERATORS="ninja" gclient runhooks Before: text data bss dec hex filename 2063530 27910 213872 2305312 232d20 out/Release/nacl_helper After: text data bss dec hex filename 6304467 234424 247984 6786875 678f3b out/Release/nacl_helper BUG=https://code.google.com/p/nativeclient/issues/detail?id=3734 TEST=Ran trybot. Review URL: https://codereview.chromium.org/140573003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@252503 0039d316-1c4b-4281-b951-d872f2087c98
* Alternative workaround for mac kernel bug.hubbe@chromium.org2013-10-151-8/+15
| | | | | | | | | | 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-15/+8
| | | | | | | | | | | | | | | | | > 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-8/+15
| | | | | | | | 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
* Implement IPC::ChannelFactory, a class that accept()s on a UNIX socket.jeremya@chromium.org2013-03-131-2/+2
| | | | | | | | | | | | | | | IPC::ChannelFactory listens on a UNIX domain socket and notifies its delegate when a client connects. The delegate is expected to craft an IPC::Channel from the handle it is given. Previously committed: - https://src.chromium.org/viewvc/chrome?view=rev&revision=186912 - https://src.chromium.org/viewvc/chrome?view=rev&revision=187233 - https://src.chromium.org/viewvc/chrome?view=rev&revision=187554 Review URL: https://codereview.chromium.org/12386010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@187772 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 187554 "Implement IPC::ChannelFactory, a class that accep..."falken@chromium.org2013-03-131-2/+2
| | | | | | | | | | | | | | | | | | | | | | Reverting because it seems to cause failures on ipc_tests (UnixDomainSocketUtil.Connect, UnixDomainSocketUtil.SendReceive) on Android. > Implement IPC::ChannelFactory, a class that accept()s on a UNIX socket. > > IPC::ChannelFactory listens on a UNIX domain socket and notifies its delegate > when a client connects. The delegate is expected to craft an IPC::Channel from > the handle it is given. > > Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=186912 > > Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=187233 > > Review URL: https://chromiumcodereview.appspot.com/12386010 TBR=jeremya@chromium.org Review URL: https://codereview.chromium.org/12431017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@187760 0039d316-1c4b-4281-b951-d872f2087c98
* Implement IPC::ChannelFactory, a class that accept()s on a UNIX socket.jeremya@chromium.org2013-03-121-2/+2
| | | | | | | | | | | | | | IPC::ChannelFactory listens on a UNIX domain socket and notifies its delegate when a client connects. The delegate is expected to craft an IPC::Channel from the handle it is given. Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=186912 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=187233 Review URL: https://chromiumcodereview.appspot.com/12386010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@187554 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 187233dmikurube@chromium.org2013-03-111-2/+2
| | | | | | | | | | | | | | | | | > Implement IPC::ChannelFactory, a class that accept()s on a UNIX socket. > > IPC::ChannelFactory listens on a UNIX domain socket and notifies its delegate > when a client connects. The delegate is expected to craft an IPC::Channel from > the handle it is given. > > Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=186912 > > Review URL: https://chromiumcodereview.appspot.com/12386010 TBR=jeremya@chromium.org Review URL: https://codereview.chromium.org/12761003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@187240 0039d316-1c4b-4281-b951-d872f2087c98
* Implement IPC::ChannelFactory, a class that accept()s on a UNIX socket.jeremya@chromium.org2013-03-111-2/+2
| | | | | | | | | | | | IPC::ChannelFactory listens on a UNIX domain socket and notifies its delegate when a client connects. The delegate is expected to craft an IPC::Channel from the handle it is given. Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=186912 Review URL: https://chromiumcodereview.appspot.com/12386010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@187233 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 186912jeremya@chromium.org2013-03-081-2/+2
| | | | | | | | | | | | | | | > Implement IPC::ChannelFactory, a class that accept()s on a UNIX socket. > > IPC::ChannelFactory listens on a UNIX domain socket and notifies its delegate > when a client connects. The delegate is expected to craft an IPC::Channel from > the handle it is given. > > Review URL: https://codereview.chromium.org/12386010 TBR=jeremya@chromium.org Review URL: https://codereview.chromium.org/12510008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@186919 0039d316-1c4b-4281-b951-d872f2087c98
* Implement IPC::ChannelFactory, a class that accept()s on a UNIX socket.jeremya@chromium.org2013-03-081-2/+2
| | | | | | | | | | IPC::ChannelFactory listens on a UNIX domain socket and notifies its delegate when a client connects. The delegate is expected to craft an IPC::Channel from the handle it is given. Review URL: https://codereview.chromium.org/12386010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@186912 0039d316-1c4b-4281-b951-d872f2087c98
* Remove IPC::Channel::set_listener().viettrungluu@chromium.org2013-01-161-3/+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
* Fix typo in comment ("ammount").viettrungluu@chromium.org2013-01-051-1/+1
| | | | | | | | | | TBR=jam@chromium.org NOTRY=true Review URL: https://chromiumcodereview.appspot.com/11794011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@175262 0039d316-1c4b-4281-b951-d872f2087c98
* Use an explicit PID for duplicating Pepper handles rather than the Channel's.brettw@chromium.org2013-01-041-1/+8
| | | | | | | | | | | | When the browser process launches the plugin, it explicitly tells each side the PID of the other side, and we now use this PID for sharing handles. Previously we'd use the PID from the IPC channel. Using the PID from the IPC channel creates a race condition because the PID isn't set until the "hello" message from the opposite side is processed, which isn't guaranteed at any particular time. BUG=168222 Review URL: https://codereview.chromium.org/11722017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@175190 0039d316-1c4b-4281-b951-d872f2087c98
* ipc: Remove ipc_listener.h from ipc_channel.h and update the files.tfarina@chromium.org2012-11-171-4/+0
| | | | | | | | | | | 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
* Fix build warnings in NaCl IPC proxy.bbudge@chromium.org2012-09-281-0/+2
| | | | | | | | | BUG=116317 TEST=builds Review URL: https://chromiumcodereview.appspot.com/10982031 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@159344 0039d316-1c4b-4281-b951-d872f2087c98
* Remove the rest of #pragma once in one big CL.ajwong@chromium.org2012-07-111-1/+0
| | | | | | | | | For context see this thread: https://groups.google.com/a/chromium.org/forum/?fromgroups#!topic/chromium-dev/RMcVNGjB4II TBR=thakis,pkasting,jam git-svn-id: svn://svn.chromium.org/chrome/trunk/src@146163 0039d316-1c4b-4281-b951-d872f2087c98
* Remove Message::Sender and Channel::Listener typedefs.brettw@chromium.org2012-06-291-7/+2
| | | | | | | | | | | 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
* RefCounted types should not have public destructors, delegate cleanuprsleevi@chromium.org2012-06-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | For Delegate/Observer-type classes that specify an interface but do not have any particular lifetime requirements, make their destructors protected. This is to allow their interfaces to be implemented safely by RefCounted types. With public destructors, it's possible to do "scoped_ptr<Delegate> foo", and then assign a RefCountedDelegateImpl, which would lead to a double free. As none of these Delegates actually need public destructors (ownership of the Delegate* is not transferred during a function call / class constructor), mark the destructors protected so that it becomes a compile warning to try to delete them via the Delegate*. BUG=123295 TEST=it compiles Review URL: https://chromiumcodereview.appspot.com/10383262 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@144086 0039d316-1c4b-4281-b951-d872f2087c98
* Separate out IPC::Message::Sender and Channel::Listener into a separate class.brettw@chromium.org2012-06-111-28/+12
| | | | | | | | | | | | | I fixed the places that did IPC::Channel::Sender (I don't even know how this compiled, but I presume this means the "Sender" base class of the "Channel" which ends up being right). We can fix the other users of this later. BUG= TEST= Review URL: https://chromiumcodereview.appspot.com/10541065 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@141534 0039d316-1c4b-4281-b951-d872f2087c98
* Fixing gcc 4.7 building problems.shenhan@google.com2012-06-051-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | a) - gcc-4.7 improved the implicit headers that it includes. with <4.7, the gthr-default.h file always pulls in unistd.h. with >=4.7, they avoided that include when possible. so code that isn't including unistd.h itself but needs it now breaks. b) - narrowing conversion in initiliazation list now raises an 'ill-formed conversion' warning, which causes error when -Werror is given. [THIS PART IS NOW REVERTED IN THE PATCH} c) - included patches from pastebin - http://pastebin.com/raw.php?i=p3UKs7Cg Note - this may not be fixing all the gcc 4.7 build problems for all parts, but rather than submitting one big-fix-for-all CL, we'd better do it incrementally (given that all the modification is reasonable and minor) so that at least some parts get a successful gcc 4.7 build. BUG=None TEST=Built successfully using GCC-4.7 under chromium chroot Review URL: https://chromiumcodereview.appspot.com/10451068 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@140470 0039d316-1c4b-4281-b951-d872f2087c98
* Add ipc_channel_nacl to the untrusted build and fix all compile/link errors.bbudge@chromium.org2012-04-231-1/+1
| | | | | | | | | ppapi_proxy_untrusted.gyp should now build with a single link error for main. BUG=116317 TEST=builds with a single link error for main(). Review URL: https://chromiumcodereview.appspot.com/10167024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@133519 0039d316-1c4b-4281-b951-d872f2087c98
* Make IPC channels track their peer process IDjschuh@chromium.org2012-04-051-0/+5
| | | | | | | | | | 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
* Verify the child process with a secret hellojschuh@chromium.org2012-03-171-0/+11
| | | | | | | | | 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-12/+12
| | | | | | | | | | | | | 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
* Add OVERRIDE to ipc/.avi@chromium.org2011-11-171-1/+1
| | | | | | | | | BUG=104314 TEST=no change Review URL: http://codereview.chromium.org/8590004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@110495 0039d316-1c4b-4281-b951-d872f2087c98
* Wait properly for renderer crashesphajdan.jr@chromium.org2011-09-191-0/+6
| | | | | | | | | | | | | | This replaces a Sleep in automation with a wait for renderer crash. It turns out that our IPC on POSIX had one loophole that caused it not to notice very early crashes, so I also fixed that. The problem was that when the child process died before connecting to the parent's IPC channel, the parent wouldn't notice the crash because the child end of the IPC pipe was kept open for too long. This change makes the code close the child end of the pipe right after forking the child. This might also help with automation not noticing the browser crash during initial launch, or at least should be a good step toward fixing that problem. BUG=38497,90489 Review URL: http://codereview.chromium.org/7870008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@101760 0039d316-1c4b-4281-b951-d872f2087c98
* Convert some constants declared as anonymous enums into static consts so ↵pkasting@chromium.org2011-09-011-7/+5
| | | | | | | | | | | | | | 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
* Fix IPC OnChannelConnected() to send correct PID on Linux/CrOSjamescook@chromium.org2011-08-311-0/+7
| | | | | | | | | | | | | | | | | | | | Sandboxed renderers on Linux/CrOS are in a PID namespace, so they don't know their own global PID. Thus the PID sent in the IPC channel Hello message contains an unexpected value, which is used in the OnChannelConnected() callback into chrome. This causes problems like the Task Manager not showing any data for FPS, JavaScript memory and image cache memory. The task manager is attempting to use the PID/process handle from BrowserMessageFilter, which got it from IPC::Channel::Listener::OnChannelConnected(), and it doesn't match the global PID of each renderer. BUG=70179 TEST=manual, open a few tabs, then open task manager, right-click to turn on JavaScript memory and image memory. Verify there are non-zero values for FPS, JavaScript memory, image cache memory Review URL: http://codereview.chromium.org/7778031 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@99040 0039d316-1c4b-4281-b951-d872f2087c98
* This patch caused Chrome to be unable to load any web pages on Chrome OS.satorux@chromium.org2011-08-231-13/+0
| | | | | | | | | | | | | BUG=chromium-os:19468 TEST=confirm chrome loads pages Revert "Fix IPC OnChannelConnected() to send correct PID on Linux/CrOS" This reverts commit 92321e01ba42f2d0e9508e921f8b440ac0b5319f. Review URL: http://codereview.chromium.org/7712022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@97811 0039d316-1c4b-4281-b951-d872f2087c98
* Fix IPC OnChannelConnected() to send correct PID on Linux/CrOSjamescook@chromium.org2011-08-191-0/+13
| | | | | | | | | | | | | | | | | | | | Sandboxed renderers on Linux/CrOS are in a PID namespace, so they don't know their own global PID. Thus the PID sent in the IPC channel Hello message contains an unexpected value, which is used in the OnChannelConnected() callback into chrome. This causes problems like the Task Manager not showing any data for FPS, JavaScript memory and image cache memory. The task manager is attempting to use the PID/process handle from BrowserMessageFilter, which got it from IPC::Channel::Listener::OnChannelConnected(), and it doesn't match the global PID of each renderer. BUG=70179 TEST=manual, open a few tabs, then open task manager, right-click to turn on JavaScript memory and image memory. Verify there are non-zero values for FPS, JavaScript memory, image cache memory Review URL: http://codereview.chromium.org/7661004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@97481 0039d316-1c4b-4281-b951-d872f2087c98
* Create ipc.dll.darin@chromium.org2011-08-151-2/+2
| | | | | | Review URL: http://codereview.chromium.org/7633042 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@96820 0039d316-1c4b-4281-b951-d872f2087c98
* Fix NamedProxyLauncher on windows. Wait for the named pipe to be connectable.kkania@chromium.org2011-08-091-0/+4
| | | | | | | | | | | 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
* Virtual destructors should have virtual keyword.hans@chromium.org2011-05-251-1/+1
| | | | | | | | | | | | | | | | | Make sure user-declared virtual destructors always have the virtual keyword. The Clang style-check plugin will check for this soon. No functionality change: virtual is only added to destructors that are already implicitly virtual. Also fix a couple of in-line destructor definitions. BUG=83408 TEST=none Review URL: http://codereview.chromium.org/7064033 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@86587 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 80604 - Revert 80602 - Limit access to named IPC channels with ↵wez@chromium.org2011-04-061-3/+17
| | | | | | | | | SO_PEERCRED, not file permissions.BUG=TEST=Run Chrome & configure a service, to get the service process to start. Close Chrome and run a copy as a different user, but from the same user-data-dir. New Chrome should not be able to communicate with the service process.Review URL: http://codereview.chromium.org/6631002TBR=wez@chromium.orgReview URL: http://codereview.chromium.org/6806006 TBR=wez@chromium.org Review URL: http://codereview.chromium.org/6806007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@80606 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 80602 - Limit access to named IPC channels with SO_PEERCRED, not file ↵wez@chromium.org2011-04-061-17/+3
| | | | | | | | | permissions.BUG=TEST=Run Chrome & configure a service, to get the service process to start. Close Chrome and run a copy as a different user, but from the same user-data-dir. New Chrome should not be able to communicate with the service process.Review URL: http://codereview.chromium.org/6631002 TBR=wez@chromium.org Review URL: http://codereview.chromium.org/6806006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@80604 0039d316-1c4b-4281-b951-d872f2087c98
* Limit access to named IPC channels with SO_PEERCRED, not file permissions.wez@chromium.org2011-04-061-3/+17
| | | | | | | | | BUG= TEST=Run Chrome & configure a service, to get the service process to start. Close Chrome and run a copy as a different user, but from the same user-data-dir. New Chrome should not be able to communicate with the service process. Review URL: http://codereview.chromium.org/6631002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@80602 0039d316-1c4b-4281-b951-d872f2087c98
* Clean up channel modesdmaclach@chromium.org2011-02-031-7/+16
| | | | | | | | | | | | 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