| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROMECAST_BROWSER_METRICS_CAST_METRICS_SERVICE_CLIENT_H_ | 5 #ifndef CHROMECAST_BROWSER_METRICS_CAST_METRICS_SERVICE_CLIENT_H_ |
| 6 #define CHROMECAST_BROWSER_METRICS_CAST_METRICS_SERVICE_CLIENT_H_ | 6 #define CHROMECAST_BROWSER_METRICS_CAST_METRICS_SERVICE_CLIENT_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| 11 #include <string> | 11 #include <string> |
| 12 | 12 |
| 13 #include "base/macros.h" | 13 #include "base/macros.h" |
| 14 #include "base/memory/ref_counted.h" | 14 #include "base/memory/ref_counted.h" |
| 15 #include "build/build_config.h" | 15 #include "build/build_config.h" |
| 16 #include "components/metrics/enabled_state_provider.h" | 16 #include "components/metrics/enabled_state_provider.h" |
| 17 #include "components/metrics/metrics_log_uploader.h" |
| 17 #include "components/metrics/metrics_service_client.h" | 18 #include "components/metrics/metrics_service_client.h" |
| 18 | 19 |
| 19 class PrefRegistrySimple; | 20 class PrefRegistrySimple; |
| 20 class PrefService; | 21 class PrefService; |
| 21 | 22 |
| 22 namespace base { | 23 namespace base { |
| 23 class SingleThreadTaskRunner; | 24 class SingleThreadTaskRunner; |
| 24 class TaskRunner; | 25 class TaskRunner; |
| 25 } | 26 } |
| 26 | 27 |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 bool GetBrand(std::string* brand_code) override; | 75 bool GetBrand(std::string* brand_code) override; |
| 75 ::metrics::SystemProfileProto::Channel GetChannel() override; | 76 ::metrics::SystemProfileProto::Channel GetChannel() override; |
| 76 std::string GetVersionString() override; | 77 std::string GetVersionString() override; |
| 77 void InitializeSystemProfileMetrics( | 78 void InitializeSystemProfileMetrics( |
| 78 const base::Closure& done_callback) override; | 79 const base::Closure& done_callback) override; |
| 79 void CollectFinalMetricsForLog(const base::Closure& done_callback) override; | 80 void CollectFinalMetricsForLog(const base::Closure& done_callback) override; |
| 80 std::string GetMetricsServerUrl() override; | 81 std::string GetMetricsServerUrl() override; |
| 81 std::unique_ptr<::metrics::MetricsLogUploader> CreateUploader( | 82 std::unique_ptr<::metrics::MetricsLogUploader> CreateUploader( |
| 82 const std::string& server_url, | 83 const std::string& server_url, |
| 83 const std::string& mime_type, | 84 const std::string& mime_type, |
| 85 ::metrics::MetricsLogUploader::MetricServiceType service_type, |
| 84 const base::Callback<void(int)>& on_upload_complete) override; | 86 const base::Callback<void(int)>& on_upload_complete) override; |
| 85 base::TimeDelta GetStandardUploadInterval() override; | 87 base::TimeDelta GetStandardUploadInterval() override; |
| 86 | 88 |
| 87 // ::metrics::EnabledStateProvider: | 89 // ::metrics::EnabledStateProvider: |
| 88 bool IsConsentGiven() override; | 90 bool IsConsentGiven() override; |
| 89 | 91 |
| 90 // Starts/stops the metrics service. | 92 // Starts/stops the metrics service. |
| 91 void EnableMetricsService(bool enabled); | 93 void EnableMetricsService(bool enabled); |
| 92 | 94 |
| 93 std::string client_id() const { return client_id_; } | 95 std::string client_id() const { return client_id_; } |
| (...skipping 23 matching lines...) Expand all Loading... |
| 117 std::unique_ptr<::metrics::EnabledStateProvider> enabled_state_provider_; | 119 std::unique_ptr<::metrics::EnabledStateProvider> enabled_state_provider_; |
| 118 net::URLRequestContextGetter* const request_context_; | 120 net::URLRequestContextGetter* const request_context_; |
| 119 | 121 |
| 120 DISALLOW_COPY_AND_ASSIGN(CastMetricsServiceClient); | 122 DISALLOW_COPY_AND_ASSIGN(CastMetricsServiceClient); |
| 121 }; | 123 }; |
| 122 | 124 |
| 123 } // namespace metrics | 125 } // namespace metrics |
| 124 } // namespace chromecast | 126 } // namespace chromecast |
| 125 | 127 |
| 126 #endif // CHROMECAST_BROWSER_METRICS_CAST_METRICS_SERVICE_CLIENT_H_ | 128 #endif // CHROMECAST_BROWSER_METRICS_CAST_METRICS_SERVICE_CLIENT_H_ |
| OLD | NEW |