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

Side by Side Diff: chromecast/media/cma/backend/alsa/stream_mixer_alsa.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 | « chromecast/graphics/cast_vsync_settings.cc ('k') | chromeos/login_event_recorder.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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "chromecast/media/cma/backend/alsa/stream_mixer_alsa.h" 5 #include "chromecast/media/cma/backend/alsa/stream_mixer_alsa.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cmath> 8 #include <cmath>
9 #include <limits> 9 #include <limits>
10 #include <unordered_set> 10 #include <unordered_set>
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 178
179 class StreamMixerAlsaInstance : public StreamMixerAlsa { 179 class StreamMixerAlsaInstance : public StreamMixerAlsa {
180 public: 180 public:
181 StreamMixerAlsaInstance() {} 181 StreamMixerAlsaInstance() {}
182 ~StreamMixerAlsaInstance() override {} 182 ~StreamMixerAlsaInstance() override {}
183 183
184 private: 184 private:
185 DISALLOW_COPY_AND_ASSIGN(StreamMixerAlsaInstance); 185 DISALLOW_COPY_AND_ASSIGN(StreamMixerAlsaInstance);
186 }; 186 };
187 187
188 base::LazyInstance<StreamMixerAlsaInstance> g_mixer_instance = 188 base::LazyInstance<StreamMixerAlsaInstance>::DestructorAtExit g_mixer_instance =
189 LAZY_INSTANCE_INITIALIZER; 189 LAZY_INSTANCE_INITIALIZER;
190 190
191 } // namespace 191 } // namespace
192 192
193 // static 193 // static
194 bool StreamMixerAlsa::single_threaded_for_test_ = false; 194 bool StreamMixerAlsa::single_threaded_for_test_ = false;
195 195
196 // static 196 // static
197 StreamMixerAlsa* StreamMixerAlsa::Get() { 197 StreamMixerAlsa* StreamMixerAlsa::Get() {
198 return g_mixer_instance.Pointer(); 198 return g_mixer_instance.Pointer();
(...skipping 763 matching lines...) Expand 10 before | Expand all | Expand 10 after
962 DCHECK(std::find(loopback_observers_.begin(), loopback_observers_.end(), 962 DCHECK(std::find(loopback_observers_.begin(), loopback_observers_.end(),
963 observer) != loopback_observers_.end()); 963 observer) != loopback_observers_.end());
964 loopback_observers_.erase(std::remove(loopback_observers_.begin(), 964 loopback_observers_.erase(std::remove(loopback_observers_.begin(),
965 loopback_observers_.end(), observer), 965 loopback_observers_.end(), observer),
966 loopback_observers_.end()); 966 loopback_observers_.end());
967 observer->OnRemoved(); 967 observer->OnRemoved();
968 } 968 }
969 969
970 } // namespace media 970 } // namespace media
971 } // namespace chromecast 971 } // namespace chromecast
OLDNEW
« no previous file with comments | « chromecast/graphics/cast_vsync_settings.cc ('k') | chromeos/login_event_recorder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698