Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3)

Side by Side Diff: ios/chrome/browser/metrics/ios_chrome_metrics_service_client.cc

Issue 1859213002: Move the thread hop for UMA user actions from content:: to base::. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Answered Alexei and Ilya. Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 metrics::kDefaultMetricsServerUrl, metrics::kDefaultMetricsMimeType, 185 metrics::kDefaultMetricsServerUrl, metrics::kDefaultMetricsMimeType,
186 on_upload_complete)); 186 on_upload_complete));
187 } 187 }
188 188
189 base::TimeDelta IOSChromeMetricsServiceClient::GetStandardUploadInterval() { 189 base::TimeDelta IOSChromeMetricsServiceClient::GetStandardUploadInterval() {
190 if (IsCellularLogicEnabled()) 190 if (IsCellularLogicEnabled())
191 return base::TimeDelta::FromSeconds(kStandardUploadIntervalCellularSeconds); 191 return base::TimeDelta::FromSeconds(kStandardUploadIntervalCellularSeconds);
192 return base::TimeDelta::FromSeconds(kStandardUploadIntervalSeconds); 192 return base::TimeDelta::FromSeconds(kStandardUploadIntervalSeconds);
193 } 193 }
194 194
195 scoped_refptr<base::SingleThreadTaskRunner>
196 IOSChromeMetricsServiceClient::GetMainThreadTaskRunner() {
197 return web::WebThread::GetTaskRunnerForThread(web::WebThread::UI);
198 }
199
195 base::string16 IOSChromeMetricsServiceClient::GetRegistryBackupKey() { 200 base::string16 IOSChromeMetricsServiceClient::GetRegistryBackupKey() {
196 return base::string16(); 201 return base::string16();
197 } 202 }
198 203
199 void IOSChromeMetricsServiceClient::OnRendererProcessCrash() { 204 void IOSChromeMetricsServiceClient::OnRendererProcessCrash() {
200 stability_metrics_provider_->LogRendererCrash(); 205 stability_metrics_provider_->LogRendererCrash();
201 } 206 }
202 207
203 void IOSChromeMetricsServiceClient::WebStateDidStartLoading( 208 void IOSChromeMetricsServiceClient::WebStateDidStartLoading(
204 web::WebState* web_state) { 209 web::WebState* web_state) {
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
330 base::Unretained(this))); 335 base::Unretained(this)));
331 } 336 }
332 337
333 void IOSChromeMetricsServiceClient::OnTabParented(web::WebState* web_state) { 338 void IOSChromeMetricsServiceClient::OnTabParented(web::WebState* web_state) {
334 metrics_service_->OnApplicationNotIdle(); 339 metrics_service_->OnApplicationNotIdle();
335 } 340 }
336 341
337 void IOSChromeMetricsServiceClient::OnURLOpenedFromOmnibox(OmniboxLog* log) { 342 void IOSChromeMetricsServiceClient::OnURLOpenedFromOmnibox(OmniboxLog* log) {
338 metrics_service_->OnApplicationNotIdle(); 343 metrics_service_->OnApplicationNotIdle();
339 } 344 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698