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

Unified Diff: content/browser/media/capture/desktop_capture_device_aura.cc

Issue 2363003003: Add UMA Metrics For Desktop Share With Audio (Closed)
Patch Set: Include Created 4 years, 3 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
Index: content/browser/media/capture/desktop_capture_device_aura.cc
diff --git a/content/browser/media/capture/desktop_capture_device_aura.cc b/content/browser/media/capture/desktop_capture_device_aura.cc
index ac8929bfa8d68fca0997ff19fd094f95ee38013b..7dafda94a0d37aef410a3158c6ee1787dc91a6fb 100644
--- a/content/browser/media/capture/desktop_capture_device_aura.cc
+++ b/content/browser/media/capture/desktop_capture_device_aura.cc
@@ -10,6 +10,7 @@
#include "base/memory/ptr_util.h"
#include "base/timer/timer.h"
#include "content/browser/media/capture/aura_window_capture_machine.h"
+#include "content/browser/media/capture/desktop_capture_device_uma_types.h"
#include "content/public/browser/browser_thread.h"
#include "ui/aura/window.h"
@@ -22,8 +23,15 @@ void SetCaptureSource(AuraWindowCaptureMachine* machine,
DCHECK_CURRENTLY_ON(BrowserThread::UI);
aura::Window* window = DesktopMediaID::GetAuraWindowById(source);
- if (window)
+ if (window) {
machine->SetWindow(window);
+ if (source.type == DesktopMediaID::TYPE_SCREEN) {
+ if (source.audio_share)
+ IncrementDesktopCaptureCounter(SCREEN_CAPTURER_CREATED_WITH_AUDIO);
+ else
+ IncrementDesktopCaptureCounter(SCREEN_CAPTURER_CREATED_WITHOUT_AUDIO);
+ }
+ }
}
} // namespace

Powered by Google App Engine
This is Rietveld 408576698