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

Unified Diff: chromecast/metrics/cast_metrics_service_client.h

Issue 638803002: Reorganizes Chromecast code to better reflect functional dependencies. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: extra DEPS: chromecast/crash/android --> chromecast/common Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chromecast/metrics/cast_metrics_prefs.cc ('k') | chromecast/metrics/cast_metrics_service_client.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromecast/metrics/cast_metrics_service_client.h
diff --git a/chromecast/metrics/cast_metrics_service_client.h b/chromecast/metrics/cast_metrics_service_client.h
deleted file mode 100644
index 9f5997a8850bd2a21eea906bc79a0a76b8f72a45..0000000000000000000000000000000000000000
--- a/chromecast/metrics/cast_metrics_service_client.h
+++ /dev/null
@@ -1,83 +0,0 @@
-// Copyright 2014 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 CHROMECAST_METRICS_CAST_METRICS_SERVICE_CLIENT_H_
-#define CHROMECAST_METRICS_CAST_METRICS_SERVICE_CLIENT_H_
-
-#include <string>
-
-#include "base/macros.h"
-#include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
-#include "components/metrics/metrics_service_client.h"
-
-class PrefService;
-
-namespace base {
-class MessageLoopProxy;
-class TaskRunner;
-}
-
-namespace metrics {
-class MetricsService;
-class MetricsStateManager;
-} // namespace metrics
-
-namespace net {
-class URLRequestContextGetter;
-} // namespace net
-
-namespace chromecast {
-namespace metrics {
-
-class CastMetricsServiceClient : public ::metrics::MetricsServiceClient {
- public:
- virtual ~CastMetricsServiceClient();
-
- static CastMetricsServiceClient* Create(
- base::TaskRunner* io_task_runner,
- PrefService* pref_service,
- net::URLRequestContextGetter* request_context);
-
- // metrics::MetricsServiceClient implementation:
- virtual void SetMetricsClientId(const std::string& client_id) override;
- virtual bool IsOffTheRecordSessionActive() override;
- virtual int32_t GetProduct() override;
- virtual std::string GetApplicationLocale() override;
- virtual bool GetBrand(std::string* brand_code) override;
- virtual ::metrics::SystemProfileProto::Channel GetChannel() override;
- virtual std::string GetVersionString() override;
- virtual void OnLogUploadComplete() override;
- virtual void StartGatheringMetrics(
- const base::Closure& done_callback) override;
- virtual void CollectFinalMetrics(const base::Closure& done_callback) override;
- virtual scoped_ptr< ::metrics::MetricsLogUploader> CreateUploader(
- const std::string& server_url,
- const std::string& mime_type,
- const base::Callback<void(int)>& on_upload_complete) override;
-
- // Starts/stops the metrics service.
- void EnableMetricsService(bool enabled);
-
- private:
- CastMetricsServiceClient(
- base::TaskRunner* io_task_runner,
- PrefService* pref_service,
- net::URLRequestContextGetter* request_context);
-
- // Returns whether or not metrics reporting is enabled.
- bool IsReportingEnabled();
-
- scoped_ptr< ::metrics::MetricsStateManager> metrics_state_manager_;
- scoped_ptr< ::metrics::MetricsService> metrics_service_;
- scoped_refptr<base::MessageLoopProxy> metrics_service_loop_;
- net::URLRequestContextGetter* request_context_;
-
- DISALLOW_COPY_AND_ASSIGN(CastMetricsServiceClient);
-};
-
-} // namespace metrics
-} // namespace chromecast
-
-#endif // CHROMECAST_METRICS_CAST_METRICS_SERVICE_CLIENT_H_
« no previous file with comments | « chromecast/metrics/cast_metrics_prefs.cc ('k') | chromecast/metrics/cast_metrics_service_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698