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 "chrome/browser/metrics/chrome_metrics_service_client.h" | 5 #include "chrome/browser/metrics/chrome_metrics_service_client.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <utility> | 9 #include <utility> |
10 #include <vector> | 10 #include <vector> |
(...skipping 488 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
499 // |FinishedReceivingProfilerData()| when the task completes. | 499 // |FinishedReceivingProfilerData()| when the task completes. |
500 metrics::TrackingSynchronizer::FetchProfilerDataAsynchronously( | 500 metrics::TrackingSynchronizer::FetchProfilerDataAsynchronously( |
501 weak_ptr_factory_.GetWeakPtr()); | 501 weak_ptr_factory_.GetWeakPtr()); |
502 } else { | 502 } else { |
503 CollectFinalHistograms(); | 503 CollectFinalHistograms(); |
504 } | 504 } |
505 } | 505 } |
506 | 506 |
507 std::unique_ptr<metrics::MetricsLogUploader> | 507 std::unique_ptr<metrics::MetricsLogUploader> |
508 ChromeMetricsServiceClient::CreateUploader( | 508 ChromeMetricsServiceClient::CreateUploader( |
| 509 const std::string& server_url, |
| 510 const std::string& mime_type, |
509 const base::Callback<void(int)>& on_upload_complete) { | 511 const base::Callback<void(int)>& on_upload_complete) { |
510 return std::unique_ptr<metrics::MetricsLogUploader>( | 512 return std::unique_ptr<metrics::MetricsLogUploader>( |
511 new metrics::NetMetricsLogUploader( | 513 new metrics::NetMetricsLogUploader( |
512 g_browser_process->system_request_context(), | 514 g_browser_process->system_request_context(), |
513 metrics::kDefaultMetricsServerUrl, metrics::kDefaultMetricsMimeType, | 515 server_url, mime_type, on_upload_complete)); |
514 on_upload_complete)); | |
515 } | 516 } |
516 | 517 |
517 base::TimeDelta ChromeMetricsServiceClient::GetStandardUploadInterval() { | 518 base::TimeDelta ChromeMetricsServiceClient::GetStandardUploadInterval() { |
518 return metrics::GetUploadInterval(); | 519 return metrics::GetUploadInterval(); |
519 } | 520 } |
520 | 521 |
521 base::string16 ChromeMetricsServiceClient::GetRegistryBackupKey() { | 522 base::string16 ChromeMetricsServiceClient::GetRegistryBackupKey() { |
522 #if defined(OS_WIN) | 523 #if defined(OS_WIN) |
523 BrowserDistribution* distribution = BrowserDistribution::GetDistribution(); | 524 BrowserDistribution* distribution = BrowserDistribution::GetDistribution(); |
524 return distribution->GetRegistryPath().append(L"\\StabilityMetrics"); | 525 return distribution->GetRegistryPath().append(L"\\StabilityMetrics"); |
(...skipping 368 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
893 } | 894 } |
894 } | 895 } |
895 | 896 |
896 void ChromeMetricsServiceClient::OnURLOpenedFromOmnibox(OmniboxLog* log) { | 897 void ChromeMetricsServiceClient::OnURLOpenedFromOmnibox(OmniboxLog* log) { |
897 metrics_service_->OnApplicationNotIdle(); | 898 metrics_service_->OnApplicationNotIdle(); |
898 } | 899 } |
899 | 900 |
900 bool ChromeMetricsServiceClient::IsUMACellularUploadLogicEnabled() { | 901 bool ChromeMetricsServiceClient::IsUMACellularUploadLogicEnabled() { |
901 return metrics::IsCellularLogicEnabled(); | 902 return metrics::IsCellularLogicEnabled(); |
902 } | 903 } |
OLD | NEW |