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 #include "chromecast/browser/metrics/cast_metrics_service_client.h" | 5 #include "chromecast/browser/metrics/cast_metrics_service_client.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/guid.h" | 8 #include "base/guid.h" |
9 #include "base/i18n/rtl.h" | 9 #include "base/i18n/rtl.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
246 } | 246 } |
247 DCHECK(!uma_server_url.empty()); | 247 DCHECK(!uma_server_url.empty()); |
248 return uma_server_url; | 248 return uma_server_url; |
249 } | 249 } |
250 | 250 |
251 std::unique_ptr<::metrics::MetricsLogUploader> | 251 std::unique_ptr<::metrics::MetricsLogUploader> |
252 CastMetricsServiceClient::CreateUploader( | 252 CastMetricsServiceClient::CreateUploader( |
253 base::StringPiece server_url, | 253 base::StringPiece server_url, |
254 base::StringPiece mime_type, | 254 base::StringPiece mime_type, |
255 ::metrics::MetricsLogUploader::MetricServiceType service_type, | 255 ::metrics::MetricsLogUploader::MetricServiceType service_type, |
256 const base::Callback<void(int)>& on_upload_complete) { | 256 const ::metrics::MetricsLogUploader::UploadCallback& on_upload_complete) { |
257 return std::unique_ptr<::metrics::MetricsLogUploader>( | 257 return std::unique_ptr<::metrics::MetricsLogUploader>( |
258 new ::metrics::NetMetricsLogUploader(request_context_, server_url, | 258 new ::metrics::NetMetricsLogUploader(request_context_, server_url, |
259 mime_type, service_type, | 259 mime_type, service_type, |
260 on_upload_complete)); | 260 on_upload_complete)); |
261 } | 261 } |
262 | 262 |
263 base::TimeDelta CastMetricsServiceClient::GetStandardUploadInterval() { | 263 base::TimeDelta CastMetricsServiceClient::GetStandardUploadInterval() { |
264 return base::TimeDelta::FromMinutes(kStandardUploadIntervalMinutes); | 264 return base::TimeDelta::FromMinutes(kStandardUploadIntervalMinutes); |
265 } | 265 } |
266 | 266 |
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
411 external_metrics_->StopAndDestroy(); | 411 external_metrics_->StopAndDestroy(); |
412 external_metrics_ = nullptr; | 412 external_metrics_ = nullptr; |
413 platform_metrics_->StopAndDestroy(); | 413 platform_metrics_->StopAndDestroy(); |
414 platform_metrics_ = nullptr; | 414 platform_metrics_ = nullptr; |
415 #endif // defined(OS_LINUX) | 415 #endif // defined(OS_LINUX) |
416 metrics_service_->Stop(); | 416 metrics_service_->Stop(); |
417 } | 417 } |
418 | 418 |
419 } // namespace metrics | 419 } // namespace metrics |
420 } // namespace chromecast | 420 } // namespace chromecast |
OLD | NEW |