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

Side by Side Diff: remoting/host/audio_capturer_linux.cc

Issue 2733283002: Require explicit selection of traits for LazyInstance (Closed)
Patch Set: l10n again Created 3 years, 9 months 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
« no previous file with comments | « printing/printed_document.cc ('k') | remoting/host/security_key/security_key_ipc_constants.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "remoting/host/audio_capturer_linux.h" 5 #include "remoting/host/audio_capturer_linux.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <utility> 9 #include <utility>
10 10
11 #include "base/files/file_path.h" 11 #include "base/files/file_path.h"
12 #include "base/lazy_instance.h" 12 #include "base/lazy_instance.h"
13 #include "base/logging.h" 13 #include "base/logging.h"
14 #include "base/memory/ptr_util.h" 14 #include "base/memory/ptr_util.h"
15 #include "remoting/proto/audio.pb.h" 15 #include "remoting/proto/audio.pb.h"
16 16
17 namespace remoting { 17 namespace remoting {
18 18
19 namespace { 19 namespace {
20 20
21 base::LazyInstance<scoped_refptr<AudioPipeReader> >::Leaky 21 base::LazyInstance<scoped_refptr<AudioPipeReader>>::Leaky
22 g_pulseaudio_pipe_sink_reader = LAZY_INSTANCE_INITIALIZER; 22 g_pulseaudio_pipe_sink_reader = LAZY_INSTANCE_INITIALIZER;
23 23
24 } // namespace 24 } // namespace
25 25
26 // TODO(wez): Remove this and have the DesktopEnvironmentFactory own the 26 // TODO(wez): Remove this and have the DesktopEnvironmentFactory own the
27 // AudioPipeReader rather than having it process-global. 27 // AudioPipeReader rather than having it process-global.
28 // See crbug.com/161373 and crbug.com/104544. 28 // See crbug.com/161373 and crbug.com/104544.
29 void AudioCapturerLinux::InitializePipeReader( 29 void AudioCapturerLinux::InitializePipeReader(
30 scoped_refptr<base::SingleThreadTaskRunner> task_runner, 30 scoped_refptr<base::SingleThreadTaskRunner> task_runner,
31 const base::FilePath& pipe_name) { 31 const base::FilePath& pipe_name) {
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 78
79 std::unique_ptr<AudioCapturer> AudioCapturer::Create() { 79 std::unique_ptr<AudioCapturer> AudioCapturer::Create() {
80 scoped_refptr<AudioPipeReader> reader = 80 scoped_refptr<AudioPipeReader> reader =
81 g_pulseaudio_pipe_sink_reader.Get(); 81 g_pulseaudio_pipe_sink_reader.Get();
82 if (!reader.get()) 82 if (!reader.get())
83 return nullptr; 83 return nullptr;
84 return base::WrapUnique(new AudioCapturerLinux(reader)); 84 return base::WrapUnique(new AudioCapturerLinux(reader));
85 } 85 }
86 86
87 } // namespace remoting 87 } // namespace remoting
OLDNEW
« no previous file with comments | « printing/printed_document.cc ('k') | remoting/host/security_key/security_key_ipc_constants.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698