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

Side by Side Diff: media/audio/audio_output_device.cc

Issue 2362663003: Log when device authorization times out. (Closed)
Patch Set: Created 4 years, 2 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 | « no previous file | no next file » | 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 "media/audio/audio_output_device.h" 5 #include "media/audio/audio_output_device.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <cmath> 10 #include <cmath>
(...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after
318 DCHECK(task_runner()->BelongsToCurrentThread()); 318 DCHECK(task_runner()->BelongsToCurrentThread());
319 319
320 auth_timeout_action_.reset(); 320 auth_timeout_action_.reset();
321 321
322 // Do nothing if late authorization is received after timeout. 322 // Do nothing if late authorization is received after timeout.
323 if (state_ == IPC_CLOSED) 323 if (state_ == IPC_CLOSED)
324 return; 324 return;
325 325
326 UMA_HISTOGRAM_BOOLEAN("Media.Audio.Render.OutputDeviceAuthorizationTimedOut", 326 UMA_HISTOGRAM_BOOLEAN("Media.Audio.Render.OutputDeviceAuthorizationTimedOut",
327 device_status == OUTPUT_DEVICE_STATUS_ERROR_TIMED_OUT); 327 device_status == OUTPUT_DEVICE_STATUS_ERROR_TIMED_OUT);
328 LOG_IF(WARNING, device_status == OUTPUT_DEVICE_STATUS_ERROR_TIMED_OUT)
329 << "Output device authorization timed out";
328 330
329 DCHECK_EQ(state_, AUTHORIZING); 331 DCHECK_EQ(state_, AUTHORIZING);
330 332
331 // It may happen that a second authorization is received as a result to a 333 // It may happen that a second authorization is received as a result to a
332 // call to Start() after Stop(). If the status for the second authorization 334 // call to Start() after Stop(). If the status for the second authorization
333 // differs from the first, it will not be reflected in |device_status_| 335 // differs from the first, it will not be reflected in |device_status_|
334 // to avoid a race. 336 // to avoid a race.
335 // This scenario is unlikely. If it occurs, the new value will be 337 // This scenario is unlikely. If it occurs, the new value will be
336 // different from OUTPUT_DEVICE_STATUS_OK, so the AudioOutputDevice 338 // different from OUTPUT_DEVICE_STATUS_OK, so the AudioOutputDevice
337 // will enter the IPC_CLOSED state anyway, which is the safe thing to do. 339 // will enter the IPC_CLOSED state anyway, which is the safe thing to do.
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
493 render_callback_->Render(output_bus_.get(), std::round(frames_delayed), 495 render_callback_->Render(output_bus_.get(), std::round(frames_delayed),
494 frames_skipped); 496 frames_skipped);
495 } 497 }
496 498
497 bool AudioOutputDevice::AudioThreadCallback:: 499 bool AudioOutputDevice::AudioThreadCallback::
498 CurrentThreadIsAudioDeviceThread() { 500 CurrentThreadIsAudioDeviceThread() {
499 return thread_checker_.CalledOnValidThread(); 501 return thread_checker_.CalledOnValidThread();
500 } 502 }
501 503
502 } // namespace media 504 } // namespace media
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698