Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(538)

Issue 2849633002: Get rid of base::SharedMemory::NULLHandle(); (Closed)

Created:
3 years, 7 months ago by erikchen
Modified:
3 years, 7 months ago
Reviewers:
Nico, brettw
CC:
chromium-reviews, yusukes+watch_chromium.org, vmpstr+watch_chromium.org, posciak+watch_chromium.org, chfremer+watch_chromium.org, gavinp+memory_chromium.org, dcheng, miu+watch_chromium.org, viettrungluu+watch_chromium.org, jam, abarth-chromium, jbauman+watch_chromium.org, nona+watch_chromium.org, darin-cc_chromium.org, kalyank, xjz+watch_chromium.org, mlamouri+watch-content_chromium.org, qsr+mojo_chromium.org, feature-media-reviews_chromium.org, yzshen+watch_chromium.org, piman+watch_chromium.org, darin (slow to review), shuchen+watch_chromium.org, Aaron Boodman, mac-reviews_chromium.org, danakj+watch_chromium.org, James Su
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Get rid of base::SharedMemory::NULLHandle(); This CL is a refactor and has no intended behavior change. NullHandle() has two use cases: * Create an invalid handle. * Return an object that can be compared against a handle to check validity. The former is also the behavior of the default constructor of base::SharedMemoryHandle, and the latter should be done with the member IsValid(). Fixing the latter also allows the removal of operator== and operator!=. BUG=713763 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.android:android_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel Review-Url: https://codereview.chromium.org/2849633002 Cr-Commit-Position: refs/heads/master@{#468231} Committed: https://chromium.googlesource.com/chromium/src/+/a40775d038de9a6a75db3965104abe56b77c9ed6

Patch Set 1 #

Total comments: 1

Patch Set 2 : comments from thakis. #

Patch Set 3 : compile error. #

Patch Set 4 : Rebase. #

Patch Set 5 : Get rid of base::SharedMemory::NULLHandle(); #

Patch Set 6 : Rebase. #

Patch Set 7 : Rebase. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+38 lines, -124 lines) Patch
M base/memory/shared_memory.h View 1 2 3 4 1 chunk +3 lines, -5 lines 0 comments Download
M base/memory/shared_memory_handle.h View 2 chunks +0 lines, -8 lines 0 comments Download
M base/memory/shared_memory_handle_mac.cc View 1 chunk +0 lines, -20 lines 0 comments Download
M base/memory/shared_memory_handle_win.cc View 1 chunk +0 lines, -12 lines 0 comments Download
M base/memory/shared_memory_mac.cc View 1 chunk +0 lines, -5 lines 0 comments Download
M base/memory/shared_memory_nacl.cc View 1 chunk +0 lines, -5 lines 0 comments Download
M base/memory/shared_memory_posix.cc View 1 2 3 4 1 chunk +0 lines, -5 lines 0 comments Download
M base/memory/shared_memory_win.cc View 1 chunk +0 lines, -5 lines 0 comments Download
M components/discardable_memory/service/discardable_shared_memory_manager.cc View 1 2 2 chunks +3 lines, -3 lines 0 comments Download
M components/nacl/common/nacl_types.cc View 2 chunks +2 lines, -5 lines 0 comments Download
M components/nacl/renderer/nexe_load_manager.cc View 2 chunks +1 line, -3 lines 0 comments Download
M content/browser/media/capture/web_contents_video_capture_device_unittest.cc View 1 chunk +1 line, -1 line 0 comments Download
M content/browser/renderer_host/clipboard_message_filter_unittest.cc View 1 chunk +1 line, -1 line 0 comments Download
M content/browser/renderer_host/render_message_filter.cc View 1 chunk +0 lines, -1 line 0 comments Download
M content/browser/renderer_host/render_widget_host_view_aura_unittest.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M content/renderer/media/audio_message_filter_unittest.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M content/renderer/pepper/mock_renderer_ppapi_host.cc View 1 chunk +1 line, -1 line 0 comments Download
M content/renderer/pepper/pepper_audio_input_host.cc View 2 chunks +2 lines, -4 lines 0 comments Download
M content/renderer/pepper/pepper_audio_output_host.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M content/renderer/renderer_blink_platform_impl.cc View 1 2 3 4 1 chunk +1 line, -2 lines 0 comments Download
M gpu/ipc/client/gpu_channel_host.cc View 1 chunk +1 line, -1 line 0 comments Download
M media/base/video_frame.cc View 2 chunks +1 line, -2 lines 0 comments Download
M media/capture/content/thread_safe_capture_oracle.cc View 1 chunk +1 line, -1 line 0 comments Download
M mojo/edk/embedder/embedder.h View 1 chunk +2 lines, -2 lines 0 comments Download
M ppapi/nacl_irt/ppapi_dispatcher.cc View 1 chunk +1 line, -1 line 0 comments Download
M ppapi/proxy/gamepad_resource.cc View 1 chunk +1 line, -1 line 0 comments Download
M ppapi/proxy/media_stream_track_resource_base.cc View 1 chunk +1 line, -1 line 0 comments Download
M ppapi/proxy/plugin_array_buffer_var.cc View 2 chunks +1 line, -2 lines 0 comments Download
M ppapi/proxy/ppb_audio_proxy.cc View 1 chunk +1 line, -1 line 0 comments Download
M ppapi/proxy/ppb_graphics_3d_proxy.cc View 1 chunk +1 line, -1 line 0 comments Download
M ppapi/proxy/proxy_channel.cc View 1 chunk +1 line, -1 line 0 comments Download
M ppapi/proxy/serialized_handle.h View 2 chunks +3 lines, -5 lines 0 comments Download
M ppapi/proxy/serialized_handle.cc View 3 chunks +0 lines, -3 lines 0 comments Download
M ppapi/proxy/video_decoder_resource.cc View 1 chunk +1 line, -1 line 0 comments Download
M ui/gfx/gpu_memory_buffer.cc View 1 chunk +1 line, -3 lines 0 comments Download
M ui/surface/transport_dib.h View 1 1 chunk +0 lines, -6 lines 0 comments Download

Depends on Patchset:

Dependent Patchsets:

Messages

Total messages: 39 (33 generated)
erikchen
thakis: Please review.
3 years, 7 months ago (2017-04-27 19:36:57 UTC) #4
Nico
lgtm, nice. https://codereview.chromium.org/2849633002/diff/1/ui/surface/transport_dib.h File ui/surface/transport_dib.h (right): https://codereview.chromium.org/2849633002/diff/1/ui/surface/transport_dib.h#newcode39 ui/surface/transport_dib.h:39: static Handle DefaultHandleValue() { return base::SharedMemoryHandle(); } ...
3 years, 7 months ago (2017-04-27 19:54:30 UTC) #8
erikchen
brettw: Please stamp this refactor. thakis is an OWNER of base/ and has reviewed the ...
3 years, 7 months ago (2017-04-27 21:23:14 UTC) #10
brettw
lgtm
3 years, 7 months ago (2017-04-27 21:30:44 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2849633002/120001
3 years, 7 months ago (2017-04-29 05:19:01 UTC) #36
commit-bot: I haz the power
3 years, 7 months ago (2017-04-29 07:17:15 UTC) #39
Message was sent while issue was closed.
Committed patchset #7 (id:120001) as
https://chromium.googlesource.com/chromium/src/+/a40775d038de9a6a75db3965104a...

Powered by Google App Engine
This is Rietveld 408576698