summaryrefslogtreecommitdiffstats
path: root/ipc/ipc_sync_message_unittest.h
Commit message (Collapse)AuthorAgeFilesLines
* ipc: don't treat replies with the unblock flag set as regular messagespiman@chromium.org2012-04-101-0/+5
| | | | | | | | | | | | | | | Old behavior would test should_unblock() before is_reply() so if both were set but TryToUnblockListener wouldn't return true (the corresponding Send isn't on top of the stack), it would queue the message as to be dispatched. This restores the correct order. BUG=122443 TEST=ipc_tests, in particular ReentrantReply Review URL: http://codereview.chromium.org/9960058 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@131617 0039d316-1c4b-4281-b951-d872f2087c98
* IPC: change sync channel dispatch restriction to allow dispatch to other ↵piman@chromium.org2012-03-301-1/+2
| | | | | | | | | | | | | channels within the same "group" This prevents 4-way deadlocks with 2 renderers talking to 2 different pepper plugins. BUG=120530 TEST=RestrictedDispatch4WayDeadlock, load chromeos chrome with 2 gmail tabs (on 2 domains), quit and restore session multiple times. Review URL: https://chromiumcodereview.appspot.com/9917002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@129944 0039d316-1c4b-4281-b951-d872f2087c98
* Add sync context dispatch restriction.piman@google.com2011-04-081-1/+4
| | | | | | | | | | | | | This adds a way to restrict on a per-channel basis that incoming messages may only be dispatched when that particular channel is sending a sync message (or in a message loop). It does so to the PPAPI channels, which may not introduce a sync dependency circle. BUG=chromiumos:13821 TEST=news.google.com with Pepper Flash (see bug) Review URL: http://codereview.chromium.org/6810013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@80892 0039d316-1c4b-4281-b951-d872f2087c98
* ipc: Simplify the magic required to create IPC message headers.This gets rid ↵jam@chromium.org2010-12-081-73/+72
| | | | | | | | | of having to include the files in a magic place because of xcode dependency issues, and just makes it simpler to create new IPC message classes. It also gets rid of including the X_messages_internal.h file multiple times, which simplifies things and should make the build a little faster. In a future change, I will remove the "internal.h" files since they're no longer needed. Review URL: http://codereview.chromium.org/5526008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@68664 0039d316-1c4b-4281-b951-d872f2087c98
* Add support for returning the session_id in both CreateExternalTab and ↵hansl@google.com2010-11-051-0/+5
| | | | | | | | | | | | ConnectExternalTab. The ChromeFrame objects now provides an unfrozen interface called IChromeFramePrivate. This interface provides a GetSessionId() which returns the ID used by Chrome in its Tab javascript object. This ID is necessary in CEEE for its tabs management. BUG=None TEST=None Review URL: http://codereview.chromium.org/4467002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@65257 0039d316-1c4b-4281-b951-d872f2087c98
* Reland 55888: Allow per-plugin content settings.bauerb@chromium.org2010-08-191-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | Now with Fixed Unit Tests! Run with --enable-resource-content-settings and --enable-click-to-play to enable. TabSpecificContentSettings now keeps track of which resources were blocked. The content setting bubble displays those resource, and selecting the "allow radio buttons adds exceptions for these resources. The infobar for non-sandboxed plug-ins now also shows a button to always allow the blocked plug-in on that site. Screenshot of the plugin bubble: http://imgur.com/6npqv.png Because we need to change the title and radio button labels depending on whether we track specific plug-ins, we copy them from the ContentSettingBubbleModel. XIB changes: Add a text field for the blocked plug-ins to ContentBlockedPlugins.xib, hooked up to the |blockedResourcesField_| outlet. BUG=39252,38432 TEST=HostContentSettingsMapTest.*,manual Review URL: http://codereview.chromium.org/2873104 Review URL: http://codereview.chromium.org/3124018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@56687 0039d316-1c4b-4281-b951-d872f2087c98
* John, please review everything.ananta@chromium.org2009-10-141-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | agl, please review changes to the waitable_event_watcher code. Multiple sync channels if used in the same listener thread could result in calls completing in the wrong context at times. This happens if there are nested calls on these sync channels, i.e 1. Call from client 1 on channel 1 to server 1. Message pumping is enabled for the corresponding message 2. Call from client 2 on channel 2 to server 2, Message pumping is enabled for the corresponding message Now if a reply for 1 arrives, it should be queued until reply 2 arrives. This does not happen which causes 2 to terminate prematurely leading to crashes, 1 waiting indefinitely at times, etc. The fix for this issue is to maintain a local global stack for the send done event watcher object. The global object is in the form of a TLS. This ensures that we only watch for completed events on the outermost sync channel. The changes in the Waitable event watcher object are to return the current delegate which is needed to start watching the old send watcher once we are done and to ensure that the event member is set even if it was already signaled when StartWatching was called. I have added a unit test in ipc_tests for this case. I removed the old QueuedReply based unit tests as they did not test the actual nested call case. While debugging these issues I also found some issues in BrowserRenderProcessHost::OnChannelError where it would delete a sync channel while it was in use. Based on a discussion with jam we decided to DeleteSoon the sync channel pointer. However this broke some browser ui tests which relied on the timing of the OnChannelError notification. We decided to leave the existing code as is for now. I removed the DCHECK on channel as it would fire repeatedly if the channel died while multiple sync calls were waiting to complete leading to OnChannelError firing multiple times. Bug=24427 Review URL: http://codereview.chromium.org/271033 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28967 0039d316-1c4b-4281-b951-d872f2087c98
* Recommit "Bring up Firefox Password Import Unittest on OS X."jeremy@chromium.org2009-08-211-1/+1
| | | | | | | | This recommits r23971 Review URL: http://codereview.chromium.org/174259 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24024 0039d316-1c4b-4281-b951-d872f2087c98
* Revert "Bring up Firefox Password Import Unittest on OS X."jeremy@chromium.org2009-08-211-1/+1
| | | | | | This reverts commit 63381b4554b1190c8a87583a5c5f403815e44e83. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23979 0039d316-1c4b-4281-b951-d872f2087c98
* Bring up Firefox Password Import Unittest on OS X.jeremy@chromium.org2009-08-211-1/+1
| | | | | | | | | | | | The NSSDecrptor class needs to be run in a child process on OS X, so we need to do some fancy footwork in the form of a bridge class. Also a few small fixes for surrounding code. BUG=18775 TEST=none Review URL: http://codereview.chromium.org/174206 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23971 0039d316-1c4b-4281-b951-d872f2087c98
* Split the IPC code into ipc/agl@chromium.org2009-07-221-0/+98
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-98/+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/+98
(No review URL: Rietvelt couldn't cope) git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13062 0039d316-1c4b-4281-b951-d872f2087c98