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

Unified Diff: chrome/browser/media/router/mojo/media_router_mojo_metrics.h

Issue 1826403002: [Media Router] Moves mojo-specific code into mojo/ folder (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Revert change to media_router.mojom to fix compile Created 4 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/media/router/mojo/media_router_mojo_metrics.h
diff --git a/chrome/browser/media/router/media_router_metrics.h b/chrome/browser/media/router/mojo/media_router_mojo_metrics.h
similarity index 56%
copy from chrome/browser/media/router/media_router_metrics.h
copy to chrome/browser/media/router/mojo/media_router_mojo_metrics.h
index a7c9e17f0603e27d960afbcd41452291c8dbc5a4..d5e72aa3661b1cfd74216c6edbc9091fdf4bdc4d 100644
--- a/chrome/browser/media/router/media_router_metrics.h
+++ b/chrome/browser/media/router/mojo/media_router_mojo_metrics.h
@@ -1,9 +1,9 @@
-// Copyright 2015 The Chromium Authors. All rights reserved.
+// Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_BROWSER_MEDIA_ROUTER_MEDIA_ROUTER_METRICS_H_
-#define CHROME_BROWSER_MEDIA_ROUTER_MEDIA_ROUTER_METRICS_H_
+#ifndef CHROME_BROWSER_MEDIA_ROUTER_MOJO_MEDIA_ROUTER_MOJO_METRICS_H_
+#define CHROME_BROWSER_MEDIA_ROUTER_MOJO_MEDIA_ROUTER_MOJO_METRICS_H_
#include "base/gtest_prod_util.h"
#include "base/time/time.h"
@@ -12,11 +12,9 @@ namespace base {
class Version;
} // namespace base
-#if !defined(OS_ANDROID)
namespace extensions {
class Extension;
} // namespace extensions
-#endif // !defined(OS_ANDROID)
namespace media_router {
@@ -24,41 +22,6 @@ namespace media_router {
// previously logged data. When making changes, also update the enum list
// in tools/metrics/histograms/histograms.xml to keep it in sync.
-// Where the user clicked to open the Media Router dialog.
-enum class MediaRouterDialogOpenOrigin {
- TOOLBAR = 0,
- OVERFLOW_MENU = 1,
- CONTEXTUAL_MENU = 2,
- PAGE = 3,
-
- // NOTE: Add entries only immediately above this line.
- TOTAL_COUNT = 4
-};
-
-// The possible outcomes from a route creation response.
-enum class MediaRouterRouteCreationOutcome {
- SUCCESS = 0,
- FAILURE_NO_ROUTE = 1,
- FAILURE_INVALID_SINK = 2,
-
- // Note: Add entries only immediately above this line.
- TOTAL_COUNT = 3,
-};
-
-// The possible actions a user can take while interacting with the Media Router
-// dialog.
-enum class MediaRouterUserAction {
- CHANGE_MODE = 0,
- START_LOCAL = 1,
- STOP_LOCAL = 2,
- CLOSE = 3,
- STATUS_REMOTE = 4,
-
- // Note: Add entries only immediately above this line.
- TOTAL_COUNT = 5
-};
-
-#if !defined(OS_ANDROID)
// Why the Media Route Provider process was woken up.
enum class MediaRouteProviderWakeReason {
CREATE_ROUTE = 0,
@@ -106,34 +69,9 @@ enum class MediaRouteProviderWakeup {
// Note: Add entries only immediately above this line.
TOTAL_COUNT = 3
};
-#endif // !defined(OS_ANDROID)
-class MediaRouterMetrics {
+class MediaRouterMojoMetrics {
public:
- // Records where the user clicked to open the Media Router dialog.
- static void RecordMediaRouterDialogOrigin(
- MediaRouterDialogOpenOrigin origin);
-
- // Records the duration it takes for the Media Router dialog to open and
- // finish painting after a user clicks to open the dialog.
- static void RecordMediaRouterDialogPaint(
- const base::TimeDelta delta);
-
- // Records the duration it takes for the Media Router dialog to load its
- // initial data after a user clicks to open the dialog.
- static void RecordMediaRouterDialogLoaded(
- const base::TimeDelta delta);
-
- // Records the first action the user took after the Media Router dialog
- // opened.
- static void RecordMediaRouterInitialUserAction(
- MediaRouterUserAction action);
-
- // Records the outcome in a create route response.
- static void RecordRouteCreationOutcome(
- MediaRouterRouteCreationOutcome outcome);
-
-#if !defined(OS_ANDROID)
// Records the installed version of the Media Router component extension.
static void RecordMediaRouteProviderVersion(
const extensions::Extension& extension);
@@ -147,16 +85,15 @@ class MediaRouterMetrics {
static void RecordMediaRouteProviderWakeup(MediaRouteProviderWakeup wakeup);
private:
- FRIEND_TEST_ALL_PREFIXES(MediaRouteProviderMetricsTest,
+ FRIEND_TEST_ALL_PREFIXES(MediaRouterMojoMetricsTest,
TestGetMediaRouteProviderVersion);
// Returns the version status of the Media Router component extension.
static MediaRouteProviderVersion GetMediaRouteProviderVersion(
const base::Version& extension_version,
const base::Version& browser_version);
-#endif // !defined(OS_ANDROID)
};
} // namespace media_router
-#endif // CHROME_BROWSER_MEDIA_ROUTER_MEDIA_ROUTER_METRICS_H_
+#endif // CHROME_BROWSER_MEDIA_ROUTER_MOJO_MEDIA_ROUTER_MOJO_METRICS_H_

Powered by Google App Engine
This is Rietveld 408576698