11320f92c476a1ad9d19dba2a48c72b75566198e9Primiano Tucci// Copyright 2014 The Chromium Authors. All rights reserved.
21320f92c476a1ad9d19dba2a48c72b75566198e9Primiano Tucci// Use of this source code is governed by a BSD-style license that can be
31320f92c476a1ad9d19dba2a48c72b75566198e9Primiano Tucci// found in the LICENSE file.
41320f92c476a1ad9d19dba2a48c72b75566198e9Primiano Tucci
51320f92c476a1ad9d19dba2a48c72b75566198e9Primiano Tucci#ifndef CHROMECAST_METRICS_PLATFORM_METRICS_PROVIDERS_H_
61320f92c476a1ad9d19dba2a48c72b75566198e9Primiano Tucci#define CHROMECAST_METRICS_PLATFORM_METRICS_PROVIDERS_H_
71320f92c476a1ad9d19dba2a48c72b75566198e9Primiano Tucci
81320f92c476a1ad9d19dba2a48c72b75566198e9Primiano Tucci#include "components/metrics/proto/system_profile.pb.h"
91320f92c476a1ad9d19dba2a48c72b75566198e9Primiano Tucci
101320f92c476a1ad9d19dba2a48c72b75566198e9Primiano Tuccinamespace metrics {
111320f92c476a1ad9d19dba2a48c72b75566198e9Primiano Tucciclass MetricsService;
121320f92c476a1ad9d19dba2a48c72b75566198e9Primiano Tucci}
131320f92c476a1ad9d19dba2a48c72b75566198e9Primiano Tucci
141320f92c476a1ad9d19dba2a48c72b75566198e9Primiano Tuccinamespace chromecast {
151320f92c476a1ad9d19dba2a48c72b75566198e9Primiano Tuccinamespace metrics {
161320f92c476a1ad9d19dba2a48c72b75566198e9Primiano Tucci
171320f92c476a1ad9d19dba2a48c72b75566198e9Primiano Tucci// Build-level hook for different platforms to provide data to MetricsService.
181320f92c476a1ad9d19dba2a48c72b75566198e9Primiano Tuccivoid RegisterPlatformMetricsProviders(
191320f92c476a1ad9d19dba2a48c72b75566198e9Primiano Tucci    ::metrics::MetricsService* metrics_service);
201320f92c476a1ad9d19dba2a48c72b75566198e9Primiano Tucci
211320f92c476a1ad9d19dba2a48c72b75566198e9Primiano Tucci// Returns the current release channel.
221320f92c476a1ad9d19dba2a48c72b75566198e9Primiano Tucci::metrics::SystemProfileProto::Channel GetPlatformReleaseChannel();
231320f92c476a1ad9d19dba2a48c72b75566198e9Primiano Tucci
241320f92c476a1ad9d19dba2a48c72b75566198e9Primiano Tucci// Returns a string representing this build's version.
251320f92c476a1ad9d19dba2a48c72b75566198e9Primiano Tuccistd::string GetPlatformVersionString();
261320f92c476a1ad9d19dba2a48c72b75566198e9Primiano Tucci
271320f92c476a1ad9d19dba2a48c72b75566198e9Primiano Tucci// Returns whether or not metrics reporting should be on.
281320f92c476a1ad9d19dba2a48c72b75566198e9Primiano Tuccibool PlatformIsReportingEnabled();
291320f92c476a1ad9d19dba2a48c72b75566198e9Primiano Tucci
301320f92c476a1ad9d19dba2a48c72b75566198e9Primiano Tucci// Called when the UMA client ID has been set.
311320f92c476a1ad9d19dba2a48c72b75566198e9Primiano Tuccivoid PlatformSetClientID(const std::string& client_id);
321320f92c476a1ad9d19dba2a48c72b75566198e9Primiano Tucci
331320f92c476a1ad9d19dba2a48c72b75566198e9Primiano Tucci// Called when an upload has completed.
341320f92c476a1ad9d19dba2a48c72b75566198e9Primiano Tuccivoid PlatformOnLogUploadComplete();
351320f92c476a1ad9d19dba2a48c72b75566198e9Primiano Tucci
361320f92c476a1ad9d19dba2a48c72b75566198e9Primiano Tucci}  // namespace metrics
371320f92c476a1ad9d19dba2a48c72b75566198e9Primiano Tucci}  // namespace chromecast
381320f92c476a1ad9d19dba2a48c72b75566198e9Primiano Tucci
391320f92c476a1ad9d19dba2a48c72b75566198e9Primiano Tucci#endif  // CHROMECAST_METRICS_PLATFORM_METRICS_PROVIDERS_H_
40