summaryrefslogtreecommitdiffstats
path: root/ipc/ipc_message_unittest.cc
Commit message (Collapse)AuthorAgeFilesLines
* Switch to standard integer types in ipc/.avi2015-12-221-0/+3
| | | | | | | | | BUG=138542 TBR=tsepez@chromium.org Review URL: https://codereview.chromium.org/1546533002 Cr-Commit-Position: refs/heads/master@{#366527}
* ipc: USE_ATTACHMENT_BROKER should apply to both Windows and OSX.erikchen2015-12-041-3/+3
| | | | | | | | | | | | Previously, many uses of the preprocessor conditional were restricted to OSX, since the Windows version of IPC::Message::Header did not have the num_brokered_attachments field. BUG=493414 Review URL: https://codereview.chromium.org/1494623003 Cr-Commit-Position: refs/heads/master@{#363155}
* ipc: Add missing includes for USE_ATTACHMENT_BROKER.erikchen2015-10-101-3/+4
| | | | | | | | | | | The preprocessor variable is defined in ipc/attachment_broker.h. There were three files that were using the variable without including the header. BUG=535711 Review URL: https://codereview.chromium.org/1392713004 Cr-Commit-Position: refs/heads/master@{#353448}
* Resize IPC input buffer to fit the next message.dskiba2015-09-301-2/+101
| | | | | | | | | | | | Sometimes we can get IPC message size from its header. In those cases we resize IPC::ChannelReader' overflow buffer to fit the entire message to avoid growing / reallocating it as we receive message's data. BUG=529940 Review URL: https://codereview.chromium.org/1345353004 Cr-Commit-Position: refs/heads/master@{#351586}
* Remove Android filter file for ipc_tests.tfarina2015-07-281-1/+6
| | | | | | | | | | BUG=339980 TEST=ipc_tests R=jbudorick@chromium.org,tsepez@chromium.org Review URL: https://codereview.chromium.org/1259823002 Cr-Commit-Position: refs/heads/master@{#340682}
* ipc: Move BasicMessageTest into ipc_message_unittest.cctfarina2015-07-271-0/+32
| | | | | | | | | | | | This should fix viettrunluu's TODO in ipc_channel_unittest.cc BUG=None TEST=ipc_tests --gtest_filter=IPCMessageTest.BasicMessageTest R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1257833002 Cr-Commit-Position: refs/heads/master@{#340495}
* Change most uses of Pickle to base::Picklebrettw2015-06-031-4/+4
| | | | | | | | | | There should be no behavior change. TBR=jschuh (IPC messages) Review URL: https://codereview.chromium.org/1154283003 Cr-Commit-Position: refs/heads/master@{#332552}
* Remove IPC_BEGIN_MESSAGE_MAP_EX macro since r270839 made all bad IPCs kill ↵jam@chromium.org2014-05-161-2/+1
| | | | | | | | | | their child processes. R=avi@chromium.org Review URL: https://codereview.chromium.org/292443004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@271096 0039d316-1c4b-4281-b951-d872f2087c98
* Simplify IPC_BEGIN_MESSAGE_MAP_WITH_PARAM macro by using decltype keyword.jam@chromium.org2014-05-141-1/+1
| | | | | | | | | BUG=304341 R=avi@chromium.org Review URL: https://codereview.chromium.org/286863002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@270479 0039d316-1c4b-4281-b951-d872f2087c98
* Add support for passing an arbitrary parameter to an IPC message handler. ↵jam@chromium.org2014-05-131-0/+80
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The motivation is for WebContentsObserver to pass RenderFrameHost* to message handlers easily. As an example, an observer would look like this: bool FooWebContentsObserver::OnMessageReceived( const IPC::Message& message, RenderFrameHost* render_frame_host) { IPC_BEGIN_MESSAGE_MAP_WITH_PARAM(FooWebContentsObserver, message, RenderFrameHost, render_frame_host) IPC_MESSAGE_HANDLER(FooHostMsg_Bar, OnBar) . . . void FooWebContentsObserver::OnBar(RenderFrameHost* render_frame_host, ... You can of course still have dispatchers without the extra parameter as before. This is generalizing the existing code that allows an IPC message handler to have a "const IPC::Message& message) first parameter to get access to the IPC. Sync IPCs don't support this yet. It's a lot more work because for them we conveniently reuse tuple's DispatchToMethod. This isn't urgent yet, since sync IPCs aren't dispatched on the UI thread for the most part because of NPAPI and Windows, so punting on this for now. BUG=304341 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/283623002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@270237 0039d316-1c4b-4281-b951-d872f2087c98
* Revert https://src.chromium.org/viewvc/chrome?view=rev&revision=231330bbudge@chromium.org2013-11-041-4/+4
| | | | | | | | | | This is a speculative revert to see if it's the cause of hanging renderers. BUG=313112 Review URL: https://codereview.chromium.org/57783006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@232819 0039d316-1c4b-4281-b951-d872f2087c98
* Remove unused IPC::Message priority.bbudge@chromium.org2013-10-281-4/+4
| | | | | | | | | | | | | | | | | Removes the PriorityValue enum and field from IPC::Message. This doesn't appear to be used anywhere. Changes the data message ctor to take a size_t data_len parameter. This works around an ambiguity problem with the main ctor, which has a similar signature and would require lots of futzing with our test code to fix. To make this work, the matching Pickle constructor is also changed to take a size_t data_len parameter. BUG=194304 Review URL: https://codereview.chromium.org/35643005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@231330 0039d316-1c4b-4281-b951-d872f2087c98
* Make net and ipc explicitly use the base namespace for Values.brettw@chromium.org2013-06-131-7/+7
| | | | | | | | | | | They're currently relying on a using in values.h that we want to remove. I removed several usings in net for consistency. BUG= R=willchan@chromium.org Review URL: https://codereview.chromium.org/15662008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@206187 0039d316-1c4b-4281-b951-d872f2087c98
* ipc: Do not use Value::Create* functions.tfarina@chromium.org2013-01-301-11/+11
| | | | | | | | | | BUG=160586 R=darin@chromium.org,estade@chromium.org Review URL: https://chromiumcodereview.appspot.com/12079026 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@179538 0039d316-1c4b-4281-b951-d872f2087c98
* Move IPC tests into anonymous namespaces.viettrungluu@chromium.org2013-01-111-0/+4
| | | | | | | | | This reduces chances of (very confusing) name collisions between different tests. Review URL: https://codereview.chromium.org/11865015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@176430 0039d316-1c4b-4281-b951-d872f2087c98
* Refactor Pickle Read methods to use higher performance PickleIterator.jbates@chromium.org2012-03-071-5/+5
| | | | | | | | | | | | | | | | There was a lot of redundant error checking and initialization code in all Pickle Read methods because of the void** iterator type. This change replaces the void* iterator with PickleIterator, which encapsulates the read pointer so that less error checking and initialization code is needed for reading. PickleIterator has all the necessary data to do the actual reading. The advantage of having it provide Read methods (as opposed to leaving them solely in the Pickle interface) is that the callers do not need to pass around the const Pickle* once they have a PickleIterator. Followup CLs will refactor the call sites to remove const Pickle* arguments where they are now unnecessary. Then the Pickle::Read* methods can be removed entirely. The alternative approach would have been to change the Pickle::Read methods to non-const and remove the iterator parameter (making Read methods advance an internal read pointer). Unfortunately, the const Read with iterator design is entrenched throughout the chromium code, making this a much more complex change with the same performance outcome. BUG=13108 Review URL: https://chromiumcodereview.appspot.com/9447084 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@125447 0039d316-1c4b-4281-b951-d872f2087c98
* Fix IPC marshalling of dictionaries with dots in their key names.kalman@chromium.org2011-08-191-0/+1
| | | | | | | | | | BUG= TEST=unit test Review URL: http://codereview.chromium.org/7671057 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@97435 0039d316-1c4b-4281-b951-d872f2087c98
* Move some files from base to base/memory.levin@chromium.org2011-03-281-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | raw_scoped_refptr_mismatch_checker.h ref_counted.cc ref_counted.h ref_counted_memory.cc ref_counted_memory.h ref_counted_unittest.cc scoped_callback_factory.h scoped_comptr_win.h scoped_handle.h scoped_native_library.cc scoped_native_library.h scoped_native_library_unittest.cc scoped_nsobject.h scoped_open_process.h scoped_ptr.h scoped_ptr_unittest.cc scoped_temp_dir.cc scoped_temp_dir.h scoped_temp_dir_unittest.cc scoped_vector.h singleton.h singleton_objc.h singleton_unittest.cc linked_ptr.h linked_ptr_unittest.cc weak_ptr.cc weak_ptr.h weak_ptr_unittest.cc BUG=None TEST=Compile Review URL: http://codereview.chromium.org/6714032 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@79524 0039d316-1c4b-4281-b951-d872f2087c98
* Rename Real* to Double* in values.* and dependent filesarv@chromium.org2011-02-011-2/+2
| | | | | | | | | BUG=None TEST=Compiles and passes all tests Review URL: http://codereview.chromium.org/6248026 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@73232 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
* Remove remaining deprecated wstring methods from base/values.{cc,h}.viettrungluu@chromium.org2010-08-171-8/+8
| | | | | | | | | BUG=23581 TEST=builds and passes tests Review URL: http://codereview.chromium.org/3109025 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@56362 0039d316-1c4b-4281-b951-d872f2087c98
* Split the IPC code into ipc/agl@chromium.org2009-07-221-0/+67
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