| 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 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 144 // |FinishedReceivingProfilerData()| when the task completes. | 144 // |FinishedReceivingProfilerData()| when the task completes. |
| 145 metrics::TrackingSynchronizer::FetchProfilerDataAsynchronously( | 145 metrics::TrackingSynchronizer::FetchProfilerDataAsynchronously( |
| 146 weak_ptr_factory_.GetWeakPtr()); | 146 weak_ptr_factory_.GetWeakPtr()); |
| 147 } else { | 147 } else { |
| 148 CollectFinalHistograms(); | 148 CollectFinalHistograms(); |
| 149 } | 149 } |
| 150 } | 150 } |
| 151 | 151 |
| 152 std::unique_ptr<metrics::MetricsLogUploader> | 152 std::unique_ptr<metrics::MetricsLogUploader> |
| 153 IOSChromeMetricsServiceClient::CreateUploader( | 153 IOSChromeMetricsServiceClient::CreateUploader( |
| 154 const std::string& server_url, |
| 155 const std::string& mime_type, |
| 154 const base::Callback<void(int)>& on_upload_complete) { | 156 const base::Callback<void(int)>& on_upload_complete) { |
| 155 return base::MakeUnique<metrics::NetMetricsLogUploader>( | 157 return base::MakeUnique<metrics::NetMetricsLogUploader>( |
| 156 GetApplicationContext()->GetSystemURLRequestContext(), | 158 GetApplicationContext()->GetSystemURLRequestContext(), |
| 157 metrics::kDefaultMetricsServerUrl, metrics::kDefaultMetricsMimeType, | 159 server_url, mime_type, on_upload_complete); |
| 158 on_upload_complete); | |
| 159 } | 160 } |
| 160 | 161 |
| 161 base::TimeDelta IOSChromeMetricsServiceClient::GetStandardUploadInterval() { | 162 base::TimeDelta IOSChromeMetricsServiceClient::GetStandardUploadInterval() { |
| 162 return metrics::GetUploadInterval(); | 163 return metrics::GetUploadInterval(); |
| 163 } | 164 } |
| 164 | 165 |
| 165 base::string16 IOSChromeMetricsServiceClient::GetRegistryBackupKey() { | 166 base::string16 IOSChromeMetricsServiceClient::GetRegistryBackupKey() { |
| 166 return base::string16(); | 167 return base::string16(); |
| 167 } | 168 } |
| 168 | 169 |
| (...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 316 | 317 |
| 317 void IOSChromeMetricsServiceClient::OnURLOpenedFromOmnibox(OmniboxLog* log) { | 318 void IOSChromeMetricsServiceClient::OnURLOpenedFromOmnibox(OmniboxLog* log) { |
| 318 metrics_service_->OnApplicationNotIdle(); | 319 metrics_service_->OnApplicationNotIdle(); |
| 319 } | 320 } |
| 320 | 321 |
| 321 metrics::EnableMetricsDefault | 322 metrics::EnableMetricsDefault |
| 322 IOSChromeMetricsServiceClient::GetMetricsReportingDefaultState() { | 323 IOSChromeMetricsServiceClient::GetMetricsReportingDefaultState() { |
| 323 return metrics::GetMetricsReportingDefaultState( | 324 return metrics::GetMetricsReportingDefaultState( |
| 324 GetApplicationContext()->GetLocalState()); | 325 GetApplicationContext()->GetLocalState()); |
| 325 } | 326 } |
| OLD | NEW |