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

Unified Diff: chrome/browser/media/router/media_router_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/media_router_metrics.h
diff --git a/chrome/browser/media/router/media_router_metrics.h b/chrome/browser/media/router/media_router_metrics.h
index a7c9e17f0603e27d960afbcd41452291c8dbc5a4..5d513479735f891c9339b8050496f47f1092d3ef 100644
--- a/chrome/browser/media/router/media_router_metrics.h
+++ b/chrome/browser/media/router/media_router_metrics.h
@@ -8,22 +8,15 @@
#include "base/gtest_prod_util.h"
#include "base/time/time.h"
-namespace base {
-class Version;
-} // namespace base
-
-#if !defined(OS_ANDROID)
-namespace extensions {
-class Extension;
-} // namespace extensions
-#endif // !defined(OS_ANDROID)
-
namespace media_router {
// NOTE: Do not renumber enums as that would confuse interpretation of
// previously logged data. When making changes, also update the enum list
// in tools/metrics/histograms/histograms.xml to keep it in sync.
+// NOTE: For metrics specific to the Media Router component extension, see
+// mojo/media_router_mojo_metrics.h.
+
// Where the user clicked to open the Media Router dialog.
enum class MediaRouterDialogOpenOrigin {
TOOLBAR = 0,
@@ -58,56 +51,6 @@ enum class MediaRouterUserAction {
TOTAL_COUNT = 5
};
-#if !defined(OS_ANDROID)
-// Why the Media Route Provider process was woken up.
-enum class MediaRouteProviderWakeReason {
- CREATE_ROUTE = 0,
- JOIN_ROUTE = 1,
- TERMINATE_ROUTE = 2,
- SEND_SESSION_MESSAGE = 3,
- SEND_SESSION_BINARY_MESSAGE = 4,
- DETACH_ROUTE = 5,
- START_OBSERVING_MEDIA_SINKS = 6,
- STOP_OBSERVING_MEDIA_SINKS = 7,
- START_OBSERVING_MEDIA_ROUTES = 8,
- STOP_OBSERVING_MEDIA_ROUTES = 9,
- LISTEN_FOR_ROUTE_MESSAGES = 10,
- STOP_LISTENING_FOR_ROUTE_MESSAGES = 11,
- CONNECTION_ERROR = 12,
- REGISTER_MEDIA_ROUTE_PROVIDER = 13,
- CONNECT_ROUTE_BY_ROUTE_ID = 14,
- ENABLE_MDNS_DISCOVERY = 15,
-
- // NOTE: Add entries only immediately above this line.
- TOTAL_COUNT = 16
-};
-
-// The install status of the Media Router component extension.
-enum class MediaRouteProviderVersion {
- // Installed but version is invalid or cannot be determined.
- UNKNOWN = 0,
- // Installed and the extension version matches the browser version.
- SAME_VERSION_AS_CHROME = 1,
- // Installed and the extension version is one version behind the browser
- // version.
- ONE_VERSION_BEHIND_CHROME = 2,
- // Installed and the extension version is more than one version behind the
- // browser version.
- MULTIPLE_VERSIONS_BEHIND_CHROME = 3,
- // Note: Add entries only immediately above this line.
- TOTAL_COUNT = 4
-};
-
-// The outcome of an attempt to wake the Media Router component event page.
-enum class MediaRouteProviderWakeup {
- SUCCESS = 0,
- ERROR_UNKNOWN = 1,
- ERROR_TOO_MANY_RETRIES = 2,
- // Note: Add entries only immediately above this line.
- TOTAL_COUNT = 3
-};
-#endif // !defined(OS_ANDROID)
-
class MediaRouterMetrics {
public:
// Records where the user clicked to open the Media Router dialog.
@@ -132,29 +75,6 @@ class MediaRouterMetrics {
// 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);
-
- // Records why the media route provider extension was woken up.
- static void RecordMediaRouteProviderWakeReason(
- MediaRouteProviderWakeReason reason);
-
- // Records the outcome of an attempt to wake the Media Router component event
- // page.
- static void RecordMediaRouteProviderWakeup(MediaRouteProviderWakeup wakeup);
-
- private:
- FRIEND_TEST_ALL_PREFIXES(MediaRouteProviderMetricsTest,
- 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
« no previous file with comments | « chrome/browser/media/router/media_router_factory.cc ('k') | chrome/browser/media/router/media_router_metrics.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698