| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "ios/chrome/browser/metrics/ios_chrome_metrics_service_client.h" | 5 #include "ios/chrome/browser/metrics/ios_chrome_metrics_service_client.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 | 8 |
| 9 #include <utility> | 9 #include <utility> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 156 // |FinishedReceivingProfilerData()| when the task completes. | 156 // |FinishedReceivingProfilerData()| when the task completes. |
| 157 metrics::TrackingSynchronizer::FetchProfilerDataAsynchronously( | 157 metrics::TrackingSynchronizer::FetchProfilerDataAsynchronously( |
| 158 weak_ptr_factory_.GetWeakPtr()); | 158 weak_ptr_factory_.GetWeakPtr()); |
| 159 } else { | 159 } else { |
| 160 CollectFinalHistograms(); | 160 CollectFinalHistograms(); |
| 161 } | 161 } |
| 162 } | 162 } |
| 163 | 163 |
| 164 std::unique_ptr<metrics::MetricsLogUploader> | 164 std::unique_ptr<metrics::MetricsLogUploader> |
| 165 IOSChromeMetricsServiceClient::CreateUploader( | 165 IOSChromeMetricsServiceClient::CreateUploader( |
| 166 const std::string& server_url, | 166 const base::StringPiece& server_url, |
| 167 const std::string& mime_type, | 167 const base::StringPiece& mime_type, |
| 168 metrics::MetricsLogUploader::MetricServiceType service_type, | 168 metrics::MetricsLogUploader::MetricServiceType service_type, |
| 169 const base::Callback<void(int)>& on_upload_complete) { | 169 const base::Callback<void(int)>& on_upload_complete) { |
| 170 return base::MakeUnique<metrics::NetMetricsLogUploader>( | 170 return base::MakeUnique<metrics::NetMetricsLogUploader>( |
| 171 GetApplicationContext()->GetSystemURLRequestContext(), server_url, | 171 GetApplicationContext()->GetSystemURLRequestContext(), server_url, |
| 172 mime_type, service_type, on_upload_complete); | 172 mime_type, service_type, on_upload_complete); |
| 173 } | 173 } |
| 174 | 174 |
| 175 base::TimeDelta IOSChromeMetricsServiceClient::GetStandardUploadInterval() { | 175 base::TimeDelta IOSChromeMetricsServiceClient::GetStandardUploadInterval() { |
| 176 return metrics::GetUploadInterval(); | 176 return metrics::GetUploadInterval(); |
| 177 } | 177 } |
| (...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 374 ukm_service_->Purge(); | 374 ukm_service_->Purge(); |
| 375 ukm_service_->ResetClientId(); | 375 ukm_service_->ResetClientId(); |
| 376 } | 376 } |
| 377 // Signal service manager to enable/disable UKM based on new state. | 377 // Signal service manager to enable/disable UKM based on new state. |
| 378 UpdateRunningServices(); | 378 UpdateRunningServices(); |
| 379 } | 379 } |
| 380 | 380 |
| 381 bool IOSChromeMetricsServiceClient::IsHistorySyncEnabledOnAllProfiles() { | 381 bool IOSChromeMetricsServiceClient::IsHistorySyncEnabledOnAllProfiles() { |
| 382 return SyncDisableObserver::IsHistorySyncEnabledOnAllProfiles(); | 382 return SyncDisableObserver::IsHistorySyncEnabledOnAllProfiles(); |
| 383 } | 383 } |
| OLD | NEW |