summaryrefslogtreecommitdiffstats
path: root/ipc/ipc_channel_nacl.h
Commit message (Collapse)AuthorAgeFilesLines
* Switch to standard integer types in ipc/.avi2015-12-221-0/+1
| | | | | | | | | BUG=138542 TBR=tsepez@chromium.org Review URL: https://codereview.chromium.org/1546533002 Cr-Commit-Position: refs/heads/master@{#366527}
* ipc: Remove unnecessary attachment broker plumbing.erikchen2015-09-241-3/+1
| | | | | | | | | | | | The original design was to pass around an instance of an attachment broker. The new design uses a single global, and no longer needs any plumbing. This CL removes the last vestiges of the plumbing. BUG=493414 Review URL: https://codereview.chromium.org/1354973006 Cr-Commit-Position: refs/heads/master@{#350471}
* ipc: Use a global for the process's attachment broker.erikchen2015-09-141-3/+0
| | | | | | | | | | | This eliminates the need for a lot of plumbing, at the expense of yet another global. BUG=493414 Review URL: https://codereview.chromium.org/1292263003 Cr-Commit-Position: refs/heads/master@{#348649}
* Reland #1: Clean up interface of attachment broker.erikchen2015-07-301-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | I forgot to initialize a member variable, which is why the original CL flakily succeeded (and managed to pass the CQ). Original issue's description: > ipc: Clean up interface of attachment broker. > > AttachmentBrokerUnprivileged now has a method > DesignateBrokerCommunicationChannel which is used by non-broker processes to > designate an IPC::Channel as the communication medium for brokerable attachment > messages. IPC::Channel has a new member attachment_broker_endpoint_ which causes > it to pass all messages through the attachment broker before forwarding them to > the listener. > > BUG=493414 > > Committed: https://crrev.com/9a06836982214f2edced21bbd1615b49e7f231bf > Cr-Commit-Position: refs/heads/master@{#341143} BUG=493414 TBR=tsepez@chromium.org Review URL: https://codereview.chromium.org/1258323004 Cr-Commit-Position: refs/heads/master@{#341207}
* Revert of ipc: Clean up interface of attachment broker. (patchset #5 ↵avi2015-07-301-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | id:80001 of https://codereview.chromium.org/1269553003/) Reason for revert: Causes failures in: IPCAttachmentBrokerPrivilegedWinTest.SendHandle IPCAttachmentBrokerPrivilegedWinTest.SendHandleToSelf IPCAttachmentBrokerPrivilegedWinTest.SendHandleWithoutPermissions on the Win7 Tests (dbg)(1) bot http://build.chromium.org/p/chromium.win/builders/Win7%20Tests%20%28dbg%29%281%29/builds/40372/steps/ipc_tests/logs/stdio Original issue's description: > ipc: Clean up interface of attachment broker. > > AttachmentBrokerUnprivileged now has a method > DesignateBrokerCommunicationChannel which is used by non-broker processes to > designate an IPC::Channel as the communication medium for brokerable attachment > messages. IPC::Channel has a new member attachment_broker_endpoint_ which causes > it to pass all messages through the attachment broker before forwarding them to > the listener. > > BUG=493414 > > Committed: https://crrev.com/9a06836982214f2edced21bbd1615b49e7f231bf > Cr-Commit-Position: refs/heads/master@{#341143} TBR=tsepez@chromium.org,erikchen@chromium.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=493414 Review URL: https://codereview.chromium.org/1259953005 Cr-Commit-Position: refs/heads/master@{#341171}
* ipc: Clean up interface of attachment broker.erikchen2015-07-301-0/+1
| | | | | | | | | | | | | | | AttachmentBrokerUnprivileged now has a method DesignateBrokerCommunicationChannel which is used by non-broker processes to designate an IPC::Channel as the communication medium for brokerable attachment messages. IPC::Channel has a new member attachment_broker_endpoint_ which causes it to pass all messages through the attachment broker before forwarding them to the listener. BUG=493414 Review URL: https://codereview.chromium.org/1269553003 Cr-Commit-Position: refs/heads/master@{#341143}
* ipc: Create an unforgeable mechanism to get the process id of the sender.erikchen2015-07-281-0/+1
| | | | | | | | | | ChannelReader now adds the process id of the sender to all external messages. BUG=513431 Review URL: https://codereview.chromium.org/1262543003 Cr-Commit-Position: refs/heads/master@{#340798}
* Update ChannelReader to use AttachmentBroker.erikchen2015-07-271-1/+2
| | | | | | | | | | | | | | | | Previously, translating from bytes into messages and dispatching the messages was accomplished in a single step. I've split this into two steps. The function TranslateInputData turns bytes into messages, and puts those messages in a queue. The function DispatchMessages() dispatches messages from the queue. Messages cannot be dispatched until all attachments have been brokered, so DispatchMessages() will sometimes wait (asynchronously) for the attachments to get brokered. BUG=466437 Review URL: https://codereview.chromium.org/1206093002 Cr-Commit-Position: refs/heads/master@{#340509}
* IPC: Make ChannelReader inherit from SupportsAttachmentBrokering.erikchen2015-06-161-1/+7
| | | | | | | | | | | | | | | | Each IPC::Channel will have a reference to an AttachmentBroker. This is accomplished by requiring each of the Channel::Create methods to have a |broker| parameter. For now, the |broker| parameter has a default value of nullptr. This default parameter only exists so that this CL and subsequent refactors can be decomposed into smaller CLs. The default parameter will be removed once all callers of Channel::Create have been updated to pass in an appropriate broker. BUG=493414 Review URL: https://codereview.chromium.org/1185133006 Cr-Commit-Position: refs/heads/master@{#334699}
* Update {virtual,override} to follow C++11 style in ipc.nick2015-04-231-12/+12
| | | | | | | | | | | | The Google style guide states that only one of {virtual,override,final} should be used for each declaration, since override implies virtual and final implies both virtual and override. This patch was manually generated using a regex and a text editor. BUG=417463 Review URL: https://codereview.chromium.org/1084323007 Cr-Commit-Position: refs/heads/master@{#326544}
* replace OVERRIDE and FINAL with override and final in ipc/mostynb2014-10-071-9/+9
| | | | | | | | BUG=417463 Review URL: https://codereview.chromium.org/633563002 Cr-Commit-Position: refs/heads/master@{#298413}
* Remove IPC::Channel::TakePipeHandle()morrita2014-09-251-1/+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}
* Introduce ChannelMojomorrita@chromium.org2014-08-041-0/+2
| | | | | | | | | | | | | | | | | | 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
* Make IPC::Channel polymorphicmorrita@chromium.org2014-06-061-10/+11
| | | | | | | | | | | | | | 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
* Eliminate a potential race in IPC::ChannelProxydmichael@chromium.org2014-03-201-0/+2
| | | | | | | | | | | | | | | | | | | | | Doing the following steps with ChannelProxy leads to a data race: 1) Create the ChannelProxy, but don't initialize it. 2) Add a filter. 3) Init the ChannelProxy. The problem is, AddFilter() posts a task from the Listener thread to the IPC task runner to do OnAddFilter. Prior to this patch, OnAddFilter will try to read channel_ even though channel_ may not have been initialized, and it's accessed without any synchronization. This patch only really adds the filter if peer_pid_ has been set on the IPC::Channel thread; otherwise, it waits until the connection has been established to really add filters. See the bug for more detail. BUG=244383 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=256188 Review URL: https://codereview.chromium.org/183553004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@258406 0039d316-1c4b-4281-b951-d872f2087c98
* Revert of Eliminate a potential race in IPC::ChannelProxy ↵johnme@chromium.org2014-03-111-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (https://codereview.chromium.org/183553004/) Reason for revert: Since this has landed, testsuite content_browsertests is failing on bot Android Tests (dbg) on the chromium.linux waterfall. Specifically, the WebContentsImplBrowserTest.OpenURLSubframe test is consistently crashing, with the following DCHECK: [FATAL:device_orientation_message_filter.cc(18)] Check failed: BrowserThread::CurrentlyOn(BrowserThread::IO). This corresponds the the following DCHECK about being on the IO thread: DeviceOrientationMessageFilter::~DeviceOrientationMessageFilter() { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); if (is_started_) DeviceInertialSensorService::GetInstance()->RemoveConsumer( CONSUMER_TYPE_ORIENTATION); } This same DCHECK failed in one of the try jobs on this CL: http://build.chromium.org/p/tryserver.chromium/builders/android_dbg_triggered_tests/builds/133648 Since this DCHECK has never been observed to fail before (certainly not in the last 200 builds), and has failed both in this CL's try job and twice in a row on the waterfall since landing this CL, it seems very likely that this CL is the cause. At a guess, the changes to ChannelProxy::Context::OnRemoveFilter seem quite relevant here. Original issue's description: > Eliminate a potential race in IPC::ChannelProxy > > Doing the following steps with ChannelProxy leads to a data race: > 1) Create the ChannelProxy, but don't initialize it. > 2) Add a filter. > 3) Init the ChannelProxy. > > The problem is, AddFilter() posts a task from the Listener thread to the IPC task runner to do OnAddFilter. Prior to this patch, OnAddFilter will try to read channel_ even though channel_ may not have been initialized, and it's accessed without any synchronization. > > This patch only really adds the filter if peer_pid_ has been set on the IPC::Channel thread; otherwise, it waits until the connection has been established to really add filters. > > See the bug for more detail. > > BUG=244383 > > Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=256188 TBR=jam@chromium.org,dmichael@chromium.org NOTREECHECKS=true NOTRY=true BUG=244383 Review URL: https://codereview.chromium.org/194923004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@256221 0039d316-1c4b-4281-b951-d872f2087c98
* Eliminate a potential race in IPC::ChannelProxydmichael@chromium.org2014-03-111-0/+2
| | | | | | | | | | | | | | | | | | | Doing the following steps with ChannelProxy leads to a data race: 1) Create the ChannelProxy, but don't initialize it. 2) Add a filter. 3) Init the ChannelProxy. The problem is, AddFilter() posts a task from the Listener thread to the IPC task runner to do OnAddFilter. Prior to this patch, OnAddFilter will try to read channel_ even though channel_ may not have been initialized, and it's accessed without any synchronization. This patch only really adds the filter if peer_pid_ has been set on the IPC::Channel thread; otherwise, it waits until the connection has been established to really add filters. See the bug for more detail. BUG=244383 Review URL: https://codereview.chromium.org/183553004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@256188 0039d316-1c4b-4281-b951-d872f2087c98
* Alternative workaround for mac kernel bug.hubbe@chromium.org2013-10-151-1/+1
| | | | | | | | | | 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-1/+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/+1
| | | | | | | | 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
* 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
* PPAPI/NaCl: Support Handle passing in ipc_channel_nacldmichael@chromium.org2012-07-101-4/+15
| | | | | | | | | | | | This is speculative, since we don't have the underlying support in NaClIPCAdapter. But I verified locally that it works as well as it did before (i.e., sending data works). BUG=116317 TEST= Review URL: https://chromiumcodereview.appspot.com/10750005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@145899 0039d316-1c4b-4281-b951-d872f2087c98
* PPAPI/NaCl: Re-land speculative implementation for ipc_channel_nacl.ccdmichael@chromium.org2012-05-311-11/+69
| | | | | | | | | | | | | Original CL: http://codereview.chromium.org/10174048/ Was committed at 139635, reverted at 139646 due to a flake. BUG=116317 TEST= TBR=dmichael@chromium.org Review URL: https://chromiumcodereview.appspot.com/10442112 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@139840 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 139635 - PPAPI/NaCl: Speculative implementation for ipc_channel_nacl.ccrch@chromium.org2012-05-301-69/+11
| | | | | | | | | | | | | BUG=116317 TEST= Review URL: https://chromiumcodereview.appspot.com/10174048 TBR=dmichael@chromium.org Review URL: https://chromiumcodereview.appspot.com/10456039 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@139646 0039d316-1c4b-4281-b951-d872f2087c98
* PPAPI/NaCl: Speculative implementation for ipc_channel_nacl.ccdmichael@chromium.org2012-05-301-11/+69
| | | | | | | | | | BUG=116317 TEST= Review URL: https://chromiumcodereview.appspot.com/10174048 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@139635 0039d316-1c4b-4281-b951-d872f2087c98
* Add ipc_channel_nacl to the untrusted build and fix all compile/link errors.bbudge@chromium.org2012-04-231-0/+8
| | | | | | | | | 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
* Add a stub version of IPC::Channel for Native Client code.brettw@chromium.org2012-03-301-0/+42
This isn't used yet, but will be necessary to get us linking when the build system is in better shape. Once that works we can start implementing this for real. Review URL: https://chromiumcodereview.appspot.com/9876003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@129909 0039d316-1c4b-4281-b951-d872f2087c98