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

Issue 6628020: Cleaning up src/media to be consistent with static versus anonymous namespaces. (Closed)

Created:
9 years, 9 months ago by scherkus (not reviewing)
Modified:
9 years, 7 months ago
CC:
chromium-reviews, hclam+watch_chromium.org, sjl, ddorwin+watch_chromium.org, fischman+watch_chromium.org, Paweł Hajdan Jr., acolwell GONE FROM CHROMIUM, annacc, pam+watch_chromium.org, ajwong+watch_chromium.org, vrk (LEFT CHROMIUM), scherkus (not reviewing)
Visibility:
Public.

Description

Cleaning up src/media to be consistent with static versus anonymous namespaces. We were using a mix of both (and sometimes even static functions *inside* anonymous namespaces!) so we decided to stick to using static. Also moved static/test code into media namespace and removed media:: prefixes. BUG=none TEST=compiles Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=77135

Patch Set 1 #

Patch Set 2 : webkit/glue/media #

Patch Set 3 : copyright year #

Patch Set 4 : fix namespaces #

Total comments: 6
Unified diffs Side-by-side diffs Delta from patch set Stats (+262 lines, -443 lines) Patch
M media/audio/audio_input_controller.cc View 1 2 3 2 chunks +3 lines, -7 lines 2 comments Download
M media/audio/audio_input_controller_unittest.cc View 3 chunks +6 lines, -11 lines 2 comments Download
M media/audio/audio_input_unittest.cc View 5 chunks +5 lines, -9 lines 0 comments Download
M media/audio/audio_manager.cc View 2 chunks +3 lines, -7 lines 0 comments Download
M media/audio/audio_manager_base.cc View 2 chunks +2 lines, -4 lines 0 comments Download
M media/audio/audio_output_controller.cc View 4 chunks +5 lines, -16 lines 2 comments Download
M media/audio/audio_output_proxy_unittest.cc View 1 2 2 chunks +3 lines, -5 lines 0 comments Download
M media/audio/audio_util.cc View 4 chunks +4 lines, -10 lines 0 comments Download
M media/audio/fake_audio_input_stream_unittest.cc View 3 chunks +1 line, -5 lines 0 comments Download
M media/audio/linux/alsa_input.cc View 2 chunks +5 lines, -9 lines 0 comments Download
M media/audio/linux/alsa_output.cc View 5 chunks +12 lines, -18 lines 0 comments Download
M media/audio/linux/alsa_util.cc View 3 chunks +9 lines, -13 lines 0 comments Download
M media/audio/linux/audio_manager_linux.cc View 2 chunks +3 lines, -7 lines 0 comments Download
M media/audio/mac/audio_manager_mac.cc View 4 chunks +7 lines, -10 lines 0 comments Download
M media/audio/mac/audio_output_mac.cc View 4 chunks +1 line, -7 lines 0 comments Download
M media/audio/openbsd/audio_manager_openbsd.cc View 2 chunks +2 lines, -4 lines 0 comments Download
M media/audio/simple_sources_unittest.cc View 3 chunks +2 lines, -6 lines 0 comments Download
M media/audio/win/audio_manager_win.cc View 3 chunks +8 lines, -12 lines 0 comments Download
M media/audio/win/audio_output_win_unittest.cc View 5 chunks +3 lines, -10 lines 0 comments Download
M media/audio/win/wavein_input_win.cc View 2 chunks +2 lines, -6 lines 0 comments Download
M media/audio/win/waveout_output_win.cc View 2 chunks +5 lines, -8 lines 0 comments Download
M media/base/media_posix.cc View 4 chunks +7 lines, -9 lines 0 comments Download
M media/base/media_win.cc View 3 chunks +5 lines, -9 lines 0 comments Download
media/base/pipeline_impl_unittest.cc View 1 chunk +3 lines, -7 lines 0 comments Download
M media/ffmpeg/file_protocol.cc View 4 chunks +8 lines, -12 lines 0 comments Download
M media/filters/decoder_base_unittest.cc View 1 2 3 4 chunks +10 lines, -18 lines 0 comments Download
M media/filters/ffmpeg_glue.cc View 1 2 3 5 chunks +17 lines, -22 lines 0 comments Download
M media/filters/file_data_source_unittest.cc View 1 2 3 2 chunks +1 line, -5 lines 0 comments Download
M media/omx/omx_codec_unittest.cc View 2 chunks +5 lines, -8 lines 0 comments Download
M media/omx/omx_configurator.cc View 1 2 3 3 chunks +7 lines, -11 lines 0 comments Download
M media/omx/omx_unittest.cc View 1 2 3 3 chunks +3 lines, -7 lines 0 comments Download
M media/tools/mfdecoder/main.cc View 12 chunks +29 lines, -32 lines 0 comments Download
M media/tools/mfplayer/mfplayer.cc View 3 chunks +4 lines, -7 lines 0 comments Download
M media/tools/scaler_bench/scaler_bench.cc View 5 chunks +10 lines, -14 lines 0 comments Download
M media/tools/shader_bench/window_linux.cc View 1 2 3 2 chunks +7 lines, -9 lines 0 comments Download
M media/tools/shader_bench/window_win.cc View 1 2 3 4 chunks +6 lines, -11 lines 0 comments Download
M media/video/mft_h264_decode_engine.cc View 1 2 3 5 chunks +6 lines, -10 lines 0 comments Download
webkit/glue/media/buffered_data_source.cc View 1 2 3 2 chunks +5 lines, -9 lines 0 comments Download
M webkit/glue/media/buffered_data_source_unittest.cc View 1 2 3 2 chunks +5 lines, -10 lines 0 comments Download
M webkit/glue/media/buffered_resource_loader.cc View 1 2 3 3 chunks +8 lines, -12 lines 0 comments Download
M webkit/glue/media/buffered_resource_loader_unittest.cc View 1 2 3 3 chunks +10 lines, -14 lines 0 comments Download
M webkit/glue/media/simple_data_source.cc View 1 2 3 2 chunks +3 lines, -7 lines 0 comments Download
M webkit/glue/media/simple_data_source_unittest.cc View 1 2 3 1 chunk +12 lines, -16 lines 0 comments Download

Messages

Total messages: 9 (0 generated)
scherkus (not reviewing)
Few things to watch out for (and I don't think I'm consistent here): 1) what ...
9 years, 9 months ago (2011-03-04 20:42:34 UTC) #1
tfarina
On 2011/03/04 20:42:34, scherkus wrote: > Few things to watch out for (and I don't ...
9 years, 9 months ago (2011-03-04 20:58:32 UTC) #2
Ami GONE FROM CHROMIUM
One of static or anonymous namespace is required to avoid polluting the containing namespace. With ...
9 years, 9 months ago (2011-03-04 21:15:19 UTC) #3
tfarina
On Fri, Mar 4, 2011 at 6:15 PM, Ami Fischman <fischman@chromium.org> wrote: > One of ...
9 years, 9 months ago (2011-03-04 21:38:37 UTC) #4
scherkus (not reviewing)
thanks for the feedback updated CL to move static/test stuff into respective namespaces
9 years, 9 months ago (2011-03-04 22:06:21 UTC) #5
Ami GONE FROM CHROMIUM
LGTM http://codereview.chromium.org/6628020/diff/1046/media/audio/audio_input_controller.cc File media/audio/audio_input_controller.cc (right): http://codereview.chromium.org/6628020/diff/1046/media/audio/audio_input_controller.cc#newcode12 media/audio/audio_input_controller.cc:12: static const int kMaxInputChannels = 2; FWIW, for ...
9 years, 9 months ago (2011-03-04 22:52:04 UTC) #6
Ami GONE FROM CHROMIUM
> > LGTM > Except trybots seem unhappy.
9 years, 9 months ago (2011-03-04 22:53:11 UTC) #7
Ami GONE FROM WEBRTC_CHROMIUM
> > LGTM > Except trybots seem unhappy.
9 years, 9 months ago (2011-03-04 22:55:13 UTC) #8
scherkus (not reviewing)
9 years, 9 months ago (2011-03-07 14:57:56 UTC) #9
http://codereview.chromium.org/6628020/diff/1046/media/audio/audio_input_cont...
File media/audio/audio_input_controller.cc (right):

http://codereview.chromium.org/6628020/diff/1046/media/audio/audio_input_cont...
media/audio/audio_input_controller.cc:12: static const int kMaxInputChannels =
2;
On 2011/03/04 22:52:04, fischman wrote:
> FWIW, for integral constants, using an unnamed enum is even sexier IMO, since
it
> requires no storage (which is more fun than out-of-line storage declarations
for
> static constants in classes, and by association even for bare constants):
> enum { kMaxInputChannels = 2 };
> 
> Using an enum also prevents taking addresses/references of these literals,
which
> is almost always a good thing.

Neat suggestion!  I'll keep that around for another clean-up task and get this
CL landed first.

http://codereview.chromium.org/6628020/diff/1046/media/audio/audio_input_cont...
File media/audio/audio_input_controller_unittest.cc (left):

http://codereview.chromium.org/6628020/diff/1046/media/audio/audio_input_cont...
media/audio/audio_input_controller_unittest.cc:30: // Test AudioInputController
for create and close without recording audio.
On 2011/03/04 22:52:04, fischman wrote:
> Do you know if this was a TODO or what?

Believe it corresponds with TEST(AudioInputControllerTest, CreateAndClose)

I'll move the comment down to the test case

http://codereview.chromium.org/6628020/diff/1046/media/audio/audio_output_con...
File media/audio/audio_output_controller.cc (left):

http://codereview.chromium.org/6628020/diff/1046/media/audio/audio_output_con...
media/audio/audio_output_controller.cc:17: return false;
On 2011/03/04 22:52:04, fischman wrote:
> Wow.

I think when AudioParameters::IsValid() was created from a refactoring I guess
no one caught this part

Powered by Google App Engine
This is Rietveld 408576698