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

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

Issue 1418763002: Revert of Eliminate //chrome dependencies from MetricsServicesManager (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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
« no previous file with comments | « ios/chrome/browser/metrics/ios_chrome_metrics_service_client.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <vector> 7 #include <vector>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 return client.Pass(); 98 return client.Pass();
99 } 99 }
100 100
101 // static 101 // static
102 void IOSChromeMetricsServiceClient::RegisterPrefs( 102 void IOSChromeMetricsServiceClient::RegisterPrefs(
103 PrefRegistrySimple* registry) { 103 PrefRegistrySimple* registry) {
104 metrics::MetricsService::RegisterPrefs(registry); 104 metrics::MetricsService::RegisterPrefs(registry);
105 metrics::StabilityMetricsHelper::RegisterPrefs(registry); 105 metrics::StabilityMetricsHelper::RegisterPrefs(registry);
106 } 106 }
107 107
108 metrics::MetricsService* IOSChromeMetricsServiceClient::GetMetricsService() {
109 return metrics_service_.get();
110 }
111
112 void IOSChromeMetricsServiceClient::SetMetricsClientId( 108 void IOSChromeMetricsServiceClient::SetMetricsClientId(
113 const std::string& client_id) { 109 const std::string& client_id) {
114 crash_keys::SetMetricsClientIdFromGUID(client_id); 110 crash_keys::SetMetricsClientIdFromGUID(client_id);
115 } 111 }
116 112
117 void IOSChromeMetricsServiceClient::OnRecordingDisabled() { 113 void IOSChromeMetricsServiceClient::OnRecordingDisabled() {
118 crash_keys::ClearMetricsClientId(); 114 crash_keys::ClearMetricsClientId();
119 } 115 }
120 116
121 bool IOSChromeMetricsServiceClient::IsOffTheRecordSessionActive() { 117 bool IOSChromeMetricsServiceClient::IsOffTheRecordSessionActive() {
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
322 base::Unretained(this))); 318 base::Unretained(this)));
323 } 319 }
324 320
325 void IOSChromeMetricsServiceClient::OnTabParented(web::WebState* web_state) { 321 void IOSChromeMetricsServiceClient::OnTabParented(web::WebState* web_state) {
326 metrics_service_->OnApplicationNotIdle(); 322 metrics_service_->OnApplicationNotIdle();
327 } 323 }
328 324
329 void IOSChromeMetricsServiceClient::OnURLOpenedFromOmnibox(OmniboxLog* log) { 325 void IOSChromeMetricsServiceClient::OnURLOpenedFromOmnibox(OmniboxLog* log) {
330 metrics_service_->OnApplicationNotIdle(); 326 metrics_service_->OnApplicationNotIdle();
331 } 327 }
OLDNEW
« no previous file with comments | « ios/chrome/browser/metrics/ios_chrome_metrics_service_client.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698