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

Side by Side Diff: content/browser/renderer_host/media/audio_sync_reader.cc

Issue 803813003: Make callers of CommandLine use it via the base:: namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/renderer_host/media/audio_sync_reader.h" 5 #include "content/browser/renderer_host/media/audio_sync_reader.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/memory/shared_memory.h" 10 #include "base/memory/shared_memory.h"
(...skipping 21 matching lines...) Expand all
32 AUDIO_RENDERER_AUDIO_GLITCHES_MAX + 1); 32 AUDIO_RENDERER_AUDIO_GLITCHES_MAX + 1);
33 } 33 }
34 34
35 } // namespace 35 } // namespace
36 36
37 namespace content { 37 namespace content {
38 38
39 AudioSyncReader::AudioSyncReader(base::SharedMemory* shared_memory, 39 AudioSyncReader::AudioSyncReader(base::SharedMemory* shared_memory,
40 const media::AudioParameters& params) 40 const media::AudioParameters& params)
41 : shared_memory_(shared_memory), 41 : shared_memory_(shared_memory),
42 mute_audio_(CommandLine::ForCurrentProcess()->HasSwitch( 42 mute_audio_(base::CommandLine::ForCurrentProcess()->HasSwitch(
43 switches::kMuteAudio)), 43 switches::kMuteAudio)),
44 packet_size_(shared_memory_->requested_size()), 44 packet_size_(shared_memory_->requested_size()),
45 renderer_callback_count_(0), 45 renderer_callback_count_(0),
46 renderer_missed_callback_count_(0), 46 renderer_missed_callback_count_(0),
47 #if defined(OS_MACOSX) 47 #if defined(OS_MACOSX)
48 maximum_wait_time_(params.GetBufferDuration() / 2), 48 maximum_wait_time_(params.GetBufferDuration() / 2),
49 #else 49 #else
50 // TODO(dalecurtis): Investigate if we can reduce this on all platforms. 50 // TODO(dalecurtis): Investigate if we can reduce this on all platforms.
51 maximum_wait_time_(base::TimeDelta::FromMilliseconds(20)), 51 maximum_wait_time_(base::TimeDelta::FromMilliseconds(20)),
52 #endif 52 #endif
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 base::TimeDelta::FromMilliseconds(1), 166 base::TimeDelta::FromMilliseconds(1),
167 base::TimeDelta::FromMilliseconds(1000), 167 base::TimeDelta::FromMilliseconds(1000),
168 50); 168 50);
169 return false; 169 return false;
170 } 170 }
171 171
172 return true; 172 return true;
173 } 173 }
174 174
175 } // namespace content 175 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698