summaryrefslogtreecommitdiffstats
path: root/ipc/ipc_channel_factory.cc
Commit message (Collapse)AuthorAgeFilesLines
* replace OVERRIDE and FINAL with override and final in ipc/mostynb2014-10-071-2/+2
| | | | | | | | BUG=417463 Review URL: https://codereview.chromium.org/633563002 Cr-Commit-Position: refs/heads/master@{#298413}
* Introduce ChannelMojomorrita@chromium.org2014-08-041-0/+42
| | | | | | | | | | | | | | | | | | 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
* Rename IPC::ChannelFactory to UnixDomainSocketAcceptor.morrita@chromium.org2014-07-181-89/+0
| | | | | | | | | | | | | | ChannelFactory doesn't create any channel and it just listens on and accepts from a unix socket. So this change renames it to represent what it actually does. R=darin@chromium.org,cpu@chromium.org,jeremya@chromium.org,tapted@chromium.org TEST=none BUG=377980 Review URL: https://codereview.chromium.org/305973002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@284231 0039d316-1c4b-4281-b951-d872f2087c98
* Implement ScopedFD in terms of ScopedGeneric.brettw@chromium.org2014-03-171-5/+5
| | | | | | | | | | | | | | | Move to a new file base/files/scoped_file.h. I will also add ScopedFILE to here (currently in file_util.h) later. I think there is a crash in the old code in content/browser/zygote_host/zygote_host_impl_linux.cc that this patch should fix. The old ScopedFD took the address of something in a vector that is being modified. I removed SafeScopedFD from content/common/sandbox_linux/sandbox_linux.cc since base's ScopedFD not CHECKs on close failure (this is a more recent addition). Reland of https://codereview.chromium.org/191673003/ R=agl, viettrungluu Review URL: https://codereview.chromium.org/202113004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@257473 0039d316-1c4b-4281-b951-d872f2087c98
* Revert of Implement ScopedFD in terms of ScopedGeneric. ↵jochen@chromium.org2014-03-151-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (https://codereview.chromium.org/191673003/) Reason for revert: Doesn't correctly link /mnt/data/b/build/slave/Chromium_Linux_Codesearch/build/src/third_party/gold/gold64: warning: hidden symbol 'base::internal::ScopedFDCloseTraits::Free(int)' in obj/base/files/nacl_helper.scoped_file.o is referenced by DSO lib/libipc.so Original issue's description: > Implement ScopedFD in terms of ScopedGeneric. > > Move to a new file base/files/scoped_file.h. I will also add ScopedFILE to here (currently in file_util.h) later. > > I think there is a crash in the old code in content/browser/zygote_host/zygote_host_impl_linux.cc that this patch should fix. The old ScopedFD took the address of something in a vector that is being modified. > > I removed SafeScopedFD from content/common/sandbox_linux/sandbox_linux.cc since base's ScopedFD not CHECKs on close failure (this is a more recent addition). > > BUG= > R=agl@chromium.org, viettrungluu@chromium.org > > Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=257001 > > Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=257179 TBR=viettrungluu@chromium.org,agl@chromium.org,brettw@chromium.org NOTREECHECKS=true NOTRY=true BUG= Review URL: https://codereview.chromium.org/201203002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@257323 0039d316-1c4b-4281-b951-d872f2087c98
* Implement ScopedFD in terms of ScopedGeneric.brettw@chromium.org2014-03-141-5/+5
| | | | | | | | | | | | | | | | | Move to a new file base/files/scoped_file.h. I will also add ScopedFILE to here (currently in file_util.h) later. I think there is a crash in the old code in content/browser/zygote_host/zygote_host_impl_linux.cc that this patch should fix. The old ScopedFD took the address of something in a vector that is being modified. I removed SafeScopedFD from content/common/sandbox_linux/sandbox_linux.cc since base's ScopedFD not CHECKs on close failure (this is a more recent addition). BUG= R=agl@chromium.org, viettrungluu@chromium.org Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=257001 Review URL: https://codereview.chromium.org/191673003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@257179 0039d316-1c4b-4281-b951-d872f2087c98
* Revert of Implement ScopedFD in terms of ScopedGeneric. ↵thakis@chromium.org2014-03-141-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (https://codereview.chromium.org/191673003/) Reason for revert: Doesn't build on android: FAILED: /mnt/data/b/build/goma/gomacc ../../third_party/llvm-build/Release+Asserts/bin/clang++ -MMD -MF obj/base/memory/base.discardable_memory_allocator_android.o.d -DV8_DEPRECATION_WARNINGS -DBLINK_SCALE_FILTERS_AT_RECORD_TIME -D_FILE_OFFSET_BITS=64 -DNO_TCMALLOC -DDISABLE_NACL -DCHROMIUM_BUILD -DCOMPONENT_BUILD -DUSE_LIBJPEG_TURBO=1 -DENABLE_WEBRTC=1 -DUSE_PROPRIETARY_CODECS -DENABLE_CONFIGURATION_POLICY -DENABLE_NEW_GAMEPAD_API=1 -DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY -DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE -DENABLE_EGLIMAGE=1 -DENABLE_AUTOFILL_DIALOG=1 -DCLD_VERSION=1 -DENABLE_PRINTING=1 -DENABLE_MANAGED_USERS=1 -DUSE_OPENSSL=1 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -DBASE_IMPLEMENTATION -DANDROID -D__GNU_SOURCE=1 -DUSE_STLPORT=1 -D_STLP_USE_PTR_SPECIALIZATIONS=1 '-DCHROME_BUILD_ID=""' -DHAVE_SYS_UIO_H -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DWTF_USE_DYNAMIC_ANNOTATIONS=1 -D_DEBUG -Igen/base -I../../third_party/android_tools/ndk/sources/android/cpufeatures -I../.. -fstack-protector --param=ssp-buffer-size=4 -Werror -fno-exceptions -fno-strict-aliasing -Wall -Wno-unused-parameter -Wno-missing-field-initializers -fvisibility=hidden -pipe -fPIC -Wheader-hygiene -Wno-char-subscripts -Wno-unneeded-internal-declaration -Wno-covered-switch-default -Wstring-conversion -Wno-c++11-narrowing -Wno-reserved-user-defined-literal -Wno-deprecated-register -Xclang -load -Xclang /mnt/data/b/build/slave/Android_Clang_Builder__dbg_/build/src/tools/clang/scripts/../../../third_party/llvm-build/Release+Asserts/lib/libFindBadConstructs.so -Xclang -add-plugin -Xclang find-bad-constructs -Xclang -plugin-arg-find-bad-constructs -Xclang check-url-directory -fcolor-diagnostics -Wexit-time-destructors -march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=softfp -mthumb -no-integrated-as -B/mnt/data/b/build/slave/Android_Clang_Builder__dbg_/build/src/third_party/android_tools/ndk//toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86_64/bin -ffunction-sections -funwind-tables -g -fstack-protector -fno-short-enums -Wa,--noexecstack -D__compiler_offsetof=__builtin_offsetof -Dnan=__builtin_nan -target arm-linux-androideabi -mllvm -arm-enable-ehabi --sysroot=/mnt/data/b/build/slave/Android_Clang_Builder__dbg_/build/src/third_party/android_tools/ndk//platforms/android-14/arch-arm -I/mnt/data/b/build/slave/Android_Clang_Builder__dbg_/build/src/third_party/android_tools/ndk//sources/cxx-stl/stlport/stlport -Os -g -fomit-frame-pointer -fdata-sections -ffunction-sections -funwind-tables -g0 -fno-rtti -fno-threadsafe-statics -fvisibility-inlines-hidden -Wsign-compare -std=gnu++11 -Wno-implicit-exception-spec-mismatch -Wno-abi -c ../../base/memory/discardable_memory_allocator_android.cc -o obj/base/memory/base.discardable_memory_allocator_android.o ../../base/memory/discardable_memory_allocator_android.cc:84:25:error: no matching function for call to 'mmap' void* const address = mmap( ^~~~ /mnt/data/b/build/slave/Android_Clang_Builder__dbg_/build/src/third_party/android_tools/ndk//platforms/android-14/arch-arm/usr/include/sys/mman.h:47:15: note: candidate function not viable: no known conversion from 'base::ScopedFD' (aka 'ScopedGeneric<int, internal::ScopedFDCloseTraits>') to 'int' for 5th argument extern void* mmap(void *, size_t, int, int, int, off_t); ^ 1 error generated. Original issue's description: > Implement ScopedFD in terms of ScopedGeneric. > > Move to a new file base/files/scoped_file.h. I will also add ScopedFILE to here (currently in file_util.h) later. > > I think there is a crash in the old code in content/browser/zygote_host/zygote_host_impl_linux.cc that this patch should fix. The old ScopedFD took the address of something in a vector that is being modified. > > I removed SafeScopedFD from content/common/sandbox_linux/sandbox_linux.cc since base's ScopedFD not CHECKs on close failure (this is a more recent addition). > > BUG= > R=agl@chromium.org, viettrungluu@chromium.org > > Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=257001 TBR=viettrungluu@chromium.org,agl@chromium.org,brettw@chromium.org NOTREECHECKS=true NOTRY=true BUG= Review URL: https://codereview.chromium.org/197873014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@257005 0039d316-1c4b-4281-b951-d872f2087c98
* Implement ScopedFD in terms of ScopedGeneric.brettw@chromium.org2014-03-141-2/+3
| | | | | | | | | | | | | | | Move to a new file base/files/scoped_file.h. I will also add ScopedFILE to here (currently in file_util.h) later. I think there is a crash in the old code in content/browser/zygote_host/zygote_host_impl_linux.cc that this patch should fix. The old ScopedFD took the address of something in a vector that is being modified. I removed SafeScopedFD from content/common/sandbox_linux/sandbox_linux.cc since base's ScopedFD not CHECKs on close failure (this is a more recent addition). BUG= R=agl@chromium.org, viettrungluu@chromium.org Review URL: https://codereview.chromium.org/191673003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@257001 0039d316-1c4b-4281-b951-d872f2087c98
* Don't HANDLE_EINTR(close). Either IGNORE_EINTR(close) or just close.mark@chromium.org2013-12-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It is incorrect to wrap close in HANDLE_EINTR on Linux. Correctness is generally undefined on Mac, but as of r223369, it is incorrect in Chrome on Mac. To avoid new offenders, a PRESUBMIT check ensures that HANDLE_EINTR is not used with close, and that IGNORE_EINTR is only used with close. Unnecessary #includes of eintr_wrapper.h are also removed. base/posix/einter_wrapper.h, PRESUBMIT.py, and ppapi/tests/test_broker.cc contain non-mechanical changes. Variable naming within the latter is updated per r178174. Missing #includes for <errno.h> in content/zygote/zygote_main_linux.cc and tools/android/common/daemon.cc were manually added. Mechanical changes were generated by running: sed -E -i '' \ -e 's/((=|if|return|CHECK|EXPECT|ASSERT).*)HANDLE(_EINTR\(.*close)/\1IGNORE\3/' \ -e 's/(ignore_result|void ?)\(HANDLE_EINTR\((.*close\(.*)\)\)/\2/' \ -e 's/(\(void\) ?)?HANDLE_EINTR\((.*close\(.*)\)/\2/' \ $(git grep -El 'HANDLE_EINTR.*close') sed -E -i '' -e '/#include.*eintr_wrapper\.h"/d' \ $(grep -EL '(HANDLE|IGNORE)_EINTR' \ $(git grep -El '#include.*eintr_wrapper\.h"')) BUG=269623 R=agl@chromium.org, jln@chromium.org TBR=OWNERS Review URL: https://codereview.chromium.org/100253002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@238390 0039d316-1c4b-4281-b951-d872f2087c98
* ipc: Use base::MessageLoop.xhwang@chromium.org2013-04-301-2/+2
| | | | | | | | | BUG=236029 R=agl@chromium.org Review URL: https://chromiumcodereview.appspot.com/14383024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@197465 0039d316-1c4b-4281-b951-d872f2087c98
* Rewrite std::string("") to std::string(), Linux edition.dcheng@chromium.org2013-04-091-1/+2
| | | | | | | | | | | | | | | | | | | This patch was generated by running the empty_string clang tool across the Chromium Linux compilation database. Implicitly or explicitly constructing std::string() with a "" argument is inefficient as the caller needs to emit extra instructions to pass an argument, and the constructor needlessly copies a byte into internal storage. Rewriting these instances to simply call the default constructor appears to save ~14-18 kilobytes on an optimized release build. BUG=none Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=193020 Review URL: https://codereview.chromium.org/13145003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@193040 0039d316-1c4b-4281-b951-d872f2087c98
* Revert "Rewrite std::string("") to std::string(), Linux edition."dcheng@chromium.org2013-04-091-2/+1
| | | | | | | | | | | | | | This reverts commit e59558b78e8c6a1b0bd916a724724b638c3c91b6. Revert "Fix build after r193020." This reverts commit 558a35897f6b3ffbcaefde927c1f150b815d140a. Revert "Really fix build after r193020." This reverts commit e3748a79b523a8d365d4a33ef986eebb4186fa78. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@193030 0039d316-1c4b-4281-b951-d872f2087c98
* Rewrite std::string("") to std::string(), Linux edition.dcheng@chromium.org2013-04-091-1/+2
| | | | | | | | | | | | | | | | | This patch was generated by running the empty_string clang tool across the Chromium Linux compilation database. Implicitly or explicitly constructing std::string() with a "" argument is inefficient as the caller needs to emit extra instructions to pass an argument, and the constructor needlessly copies a byte into internal storage. Rewriting these instances to simply call the default constructor appears to save ~14-18 kilobytes on an optimized release build. BUG=none Review URL: https://codereview.chromium.org/13145003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@193020 0039d316-1c4b-4281-b951-d872f2087c98
* Implement IPC::ChannelFactory, a class that accept()s on a UNIX socket.jeremya@chromium.org2013-03-131-0/+88
| | | | | | | | | | | | | | | 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-88/+0
| | | | | | | | | | | | | | | | | | | | | | 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-0/+88
| | | | | | | | | | | | | | 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-88/+0
| | | | | | | | | | | | | | | | | > 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-0/+88
| | | | | | | | | | | | 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-88/+0
| | | | | | | | | | | | | | | > 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-0/+88
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