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

Issue 9015015: Take advantage of the new Pass() machinery on scoped_ptr{,_malloc}. (Closed)

Created:
8 years, 12 months ago by Ami GONE FROM CHROMIUM
Modified:
8 years, 11 months ago
CC:
chromium-reviews, hclam+watch_chromium.org, ddorwin+watch_chromium.org, fischman+watch_chromium.org, Paweł Hajdan Jr., acolwell+watch_chromium.org, annacc+watch_chromium.org, darin-cc_chromium.org, brettw-cc_chromium.org, vrk (LEFT CHROMIUM), scherkus (not reviewing), ihf+watch_chromium.org, awong
Visibility:
Public.

Description

Take advantage of the new Pass() machinery on scoped_ptr{,_malloc}. Pass() was announced in https://groups.google.com/a/chromium.org/d/topic/chromium-dev/RTd7rNxHjqk/discussion This CL replaces comments about ownership transfer (in all files whose paths contain media/) with the explicit passing of the appropriate scoper. The exceptions that are not touched by this CL: - scoped_refptr<> doesn't support Pass() and so is untouched. - media/audio code defines its own callback machinery, mimicking the old-style callbacks (pass by pointer, explicit deletes). I think that whole pile needs to be replaced with new-style (Bind) callbacks, so left it alone for now. BUG=none TEST=trybots Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=117009

Patch Set 1 #

Total comments: 1

Patch Set 2 : fix win,win_rel,linux_rel trybot failures. #

Patch Set 3 : . #

Patch Set 4 : . #

Patch Set 5 : . #

Total comments: 2

Patch Set 6 : rebased & removed unnecessary include of ffmpeg_common.h from ffmpeg_demuxer.h #

Total comments: 8

Patch Set 7 : acolwell CR response. #

Patch Set 8 : Remove the dependency on CL 8968032 and point TODOs at the newly-filed bug. #

Total comments: 6

Patch Set 9 : acolwell CR#2 responses. #

Total comments: 2

Patch Set 10 : . #

Patch Set 11 : . #

Unified diffs Side-by-side diffs Delta from patch set Stats (+222 lines, -209 lines) Patch
M content/renderer/media/render_media_log.h View 1 1 chunk +1 line, -1 line 0 comments Download
M content/renderer/media/render_media_log.cc View 1 1 chunk +5 lines, -6 lines 0 comments Download
M media/base/async_filter_factory_base.h View 1 chunk +1 line, -1 line 0 comments Download
M media/base/composite_data_source_factory.h View 1 chunk +3 lines, -3 lines 0 comments Download
M media/base/composite_data_source_factory.cc View 1 2 3 4 5 6 7 2 chunks +12 lines, -8 lines 0 comments Download
M media/base/data_buffer.h View 1 chunk +2 lines, -3 lines 0 comments Download
M media/base/data_buffer.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M media/base/filter_collection.h View 1 chunk +1 line, -2 lines 0 comments Download
M media/base/filter_collection.cc View 1 chunk +3 lines, -3 lines 0 comments Download
M media/base/filter_factories.h View 2 chunks +2 lines, -2 lines 0 comments Download
M media/base/media_log.h View 1 chunk +17 lines, -16 lines 0 comments Download
M media/base/media_log.cc View 1 2 3 4 5 6 7 8 9 2 chunks +27 lines, -27 lines 0 comments Download
M media/base/mock_filters.h View 2 chunks +6 lines, -7 lines 0 comments Download
M media/base/mock_filters.cc View 1 2 3 4 5 6 7 8 3 chunks +13 lines, -9 lines 0 comments Download
M media/base/pipeline.h View 2 chunks +2 lines, -3 lines 0 comments Download
M media/base/pipeline_impl.h View 2 chunks +2 lines, -2 lines 0 comments Download
M media/base/pipeline_impl.cc View 1 2 3 chunks +4 lines, -5 lines 0 comments Download
M media/base/pipeline_impl_unittest.cc View 3 chunks +5 lines, -8 lines 0 comments Download
M media/base/test_data_util.cc View 1 chunk +1 line, -1 line 0 comments Download
M media/filters/audio_renderer_algorithm_base.h View 1 chunk +4 lines, -6 lines 0 comments Download
M media/filters/audio_renderer_algorithm_base_unittest.cc View 1 2 3 4 5 6 7 8 9 4 chunks +8 lines, -4 lines 0 comments Download
M media/filters/chunk_demuxer.cc View 1 2 3 4 5 6 7 8 1 chunk +3 lines, -1 line 0 comments Download
M media/filters/chunk_demuxer_factory.h View 1 chunk +3 lines, -3 lines 0 comments Download
M media/filters/chunk_demuxer_factory.cc View 2 chunks +8 lines, -6 lines 0 comments Download
M media/filters/dummy_demuxer_factory.h View 1 chunk +1 line, -1 line 0 comments Download
M media/filters/dummy_demuxer_factory.cc View 1 chunk +3 lines, -2 lines 0 comments Download
M media/filters/ffmpeg_demuxer.h View 1 2 3 4 5 2 chunks +3 lines, -2 lines 0 comments Download
M media/filters/ffmpeg_demuxer.cc View 1 2 3 4 5 5 chunks +11 lines, -10 lines 0 comments Download
M media/filters/ffmpeg_demuxer_factory.h View 1 chunk +2 lines, -3 lines 0 comments Download
M media/filters/ffmpeg_demuxer_factory.cc View 2 chunks +5 lines, -4 lines 0 comments Download
M media/filters/file_data_source_factory.h View 1 chunk +1 line, -1 line 0 comments Download
M media/filters/file_data_source_factory.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M media/filters/gpu_video_decoder.h View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -2 lines 0 comments Download
M media/filters/gpu_video_decoder.cc View 1 2 3 4 5 6 7 8 9 1 chunk +2 lines, -2 lines 0 comments Download
M media/tools/player_wtl/movie.cc View 1 2 3 4 5 6 7 8 9 10 2 chunks +5 lines, -3 lines 0 comments Download
M media/tools/player_x11/player_x11.cc View 1 2 3 4 5 6 7 8 9 2 chunks +4 lines, -3 lines 0 comments Download
M media/webm/cluster_builder.h View 1 2 3 4 5 6 2 chunks +3 lines, -4 lines 0 comments Download
M media/webm/cluster_builder.cc View 1 2 3 4 5 6 2 chunks +5 lines, -4 lines 0 comments Download
M media/webm/webm_cluster_parser.cc View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M media/webm/webm_parser_unittest.cc View 1 2 3 4 5 6 1 chunk +3 lines, -3 lines 0 comments Download
M webkit/media/active_loader.h View 1 chunk +1 line, -3 lines 0 comments Download
M webkit/media/active_loader.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M webkit/media/buffered_data_source_unittest.cc View 1 2 3 4 5 6 7 1 chunk +5 lines, -2 lines 0 comments Download
M webkit/media/buffered_resource_loader.h View 1 chunk +2 lines, -4 lines 0 comments Download
M webkit/media/buffered_resource_loader.cc View 1 2 3 4 5 6 2 chunks +7 lines, -6 lines 0 comments Download
M webkit/media/buffered_resource_loader_unittest.cc View 1 chunk +1 line, -1 line 0 comments Download
M webkit/media/web_data_source_factory.h View 1 chunk +1 line, -1 line 0 comments Download
M webkit/media/web_data_source_factory.cc View 1 chunk +3 lines, -3 lines 0 comments Download
M webkit/media/webmediaplayer_impl.cc View 1 2 3 4 5 6 7 8 9 3 chunks +13 lines, -11 lines 0 comments Download

Messages

Total messages: 13 (0 generated)
Ami GONE FROM CHROMIUM
This is a speculative CL to see what happens if we apply Albert's spiffy new ...
8 years, 12 months ago (2011-12-30 02:09:27 UTC) #1
Sergey Ulanov
http://codereview.chromium.org/9015015/diff/15001/media/filters/ffmpeg_demuxer.h File media/filters/ffmpeg_demuxer.h (right): http://codereview.chromium.org/9015015/diff/15001/media/filters/ffmpeg_demuxer.h#newcode36 media/filters/ffmpeg_demuxer.h:36: #include "media/ffmpeg/ffmpeg_common.h" Is it possible to forward declare ScopedPtrAVFreePacket ...
8 years, 11 months ago (2012-01-02 20:22:40 UTC) #2
Ami GONE FROM CHROMIUM
http://codereview.chromium.org/9015015/diff/15001/media/filters/ffmpeg_demuxer.h File media/filters/ffmpeg_demuxer.h (right): http://codereview.chromium.org/9015015/diff/15001/media/filters/ffmpeg_demuxer.h#newcode36 media/filters/ffmpeg_demuxer.h:36: #include "media/ffmpeg/ffmpeg_common.h" On 2012/01/02 20:22:40, sergeyu wrote: > Is ...
8 years, 11 months ago (2012-01-03 00:35:59 UTC) #3
acolwell GONE FROM CHROMIUM
LGTM http://codereview.chromium.org/9015015/diff/20001/media/base/mock_filters.cc File media/base/mock_filters.cc (right): http://codereview.chromium.org/9015015/diff/20001/media/base/mock_filters.cc#newcode70 media/base/mock_filters.cc:70: return scoped_ptr<DemuxerFactory>(reinterpret_cast<DemuxerFactory*>( Why is the reinterpret_cast needed here? ...
8 years, 11 months ago (2012-01-03 19:27:06 UTC) #4
Ami GONE FROM CHROMIUM
http://codereview.chromium.org/9015015/diff/20001/media/base/mock_filters.cc File media/base/mock_filters.cc (right): http://codereview.chromium.org/9015015/diff/20001/media/base/mock_filters.cc#newcode70 media/base/mock_filters.cc:70: return scoped_ptr<DemuxerFactory>(reinterpret_cast<DemuxerFactory*>( On 2012/01/03 19:27:06, acolwell wrote: > Why ...
8 years, 11 months ago (2012-01-03 20:58:34 UTC) #5
acolwell GONE FROM CHROMIUM
http://codereview.chromium.org/9015015/diff/23005/media/base/mock_filters.cc File media/base/mock_filters.cc (right): http://codereview.chromium.org/9015015/diff/23005/media/base/mock_filters.cc#newcode150 media/base/mock_filters.cc:150: demuxer_factory.release())); // TODO(fischman): replace the extra scoped_ptr+release() with Pass() ...
8 years, 11 months ago (2012-01-03 22:46:40 UTC) #6
Ami GONE FROM CHROMIUM
http://codereview.chromium.org/9015015/diff/23005/media/base/mock_filters.cc File media/base/mock_filters.cc (right): http://codereview.chromium.org/9015015/diff/23005/media/base/mock_filters.cc#newcode150 media/base/mock_filters.cc:150: demuxer_factory.release())); On 2012/01/03 22:46:40, acolwell wrote: > // TODO(fischman): ...
8 years, 11 months ago (2012-01-03 22:52:02 UTC) #7
scherkus (not reviewing)
LGTM w/ nit on missed indents http://codereview.chromium.org/9015015/diff/28001/media/base/media_log.cc File media/base/media_log.cc (right): http://codereview.chromium.org/9015015/diff/28001/media/base/media_log.cc#newcode165 media/base/media_log.cc:165: const char* property, ...
8 years, 11 months ago (2012-01-10 02:11:30 UTC) #8
Ami GONE FROM CHROMIUM
Thanks for the review. sergeyu: removing you from reviewers b/c I'm guessing it was unintentional ...
8 years, 11 months ago (2012-01-10 03:25:59 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/fischman@chromium.org/9015015/33001
8 years, 11 months ago (2012-01-10 03:26:16 UTC) #10
commit-bot: I haz the power
Presubmit check for 9015015-33001 failed and returned exit status 1. Running presubmit commit checks ...
8 years, 11 months ago (2012-01-10 03:26:36 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/fischman@chromium.org/9015015/38001
8 years, 11 months ago (2012-01-10 03:34:21 UTC) #12
commit-bot: I haz the power
8 years, 11 months ago (2012-01-10 04:47:47 UTC) #13
Change committed as 117009

Powered by Google App Engine
This is Rietveld 408576698