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

Unified Diff: chrome/browser/chromeos/audio_handler.cc

Issue 3013042: Revert 53992 - An earlier check-in (r51786, Issue 2769008) caused a memory le... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 10 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/chromeos/audio_handler.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/audio_handler.cc
===================================================================
--- chrome/browser/chromeos/audio_handler.cc (revision 54169)
+++ chrome/browser/chromeos/audio_handler.cc (working copy)
@@ -95,15 +95,18 @@
mixer_->SetMute(do_mute);
}
-bool AudioHandler::IsValid() {
- return mixer_->CheckState() == PulseAudioMixer::READY;
+void AudioHandler::OnMixerInitialized(bool success) {
+ connected_ = success;
+ DLOG(INFO) << "OnMixerInitialized, success = " << success;
}
AudioHandler::AudioHandler()
- : reconnect_tries_(0) {
+ : connected_(false),
+ reconnect_tries_(0) {
mixer_.reset(new PulseAudioMixer());
- connected_ = mixer_->InitSync();
- DLOG(INFO) << "Mixer connected = " << connected_;
+ if (!mixer_->Init(NewCallback(this, &AudioHandler::OnMixerInitialized))) {
+ LOG(ERROR) << "Unable to connect to PulseAudio";
+ }
}
AudioHandler::~AudioHandler() {
« no previous file with comments | « chrome/browser/chromeos/audio_handler.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698