| 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/interstitials/ios_chrome_metrics_helper.h" | 5 #include "ios/chrome/browser/interstitials/ios_chrome_metrics_helper.h" |
| 6 | 6 |
| 7 #include "components/history/core/browser/history_service.h" | 7 #include "components/history/core/browser/history_service.h" |
| 8 #include "components/keyed_service/core/service_access_type.h" | 8 #include "components/keyed_service/core/service_access_type.h" |
| 9 #include "components/rappor/rappor_service.h" | 9 #include "components/rappor/rappor_service_impl.h" |
| 10 #include "ios/chrome/browser/application_context.h" | 10 #include "ios/chrome/browser/application_context.h" |
| 11 #include "ios/chrome/browser/browser_state/chrome_browser_state.h" | 11 #include "ios/chrome/browser/browser_state/chrome_browser_state.h" |
| 12 #include "ios/chrome/browser/history/history_service_factory.h" | 12 #include "ios/chrome/browser/history/history_service_factory.h" |
| 13 #include "ios/web/public/web_state/web_state.h" | 13 #include "ios/web/public/web_state/web_state.h" |
| 14 | 14 |
| 15 #if !defined(__has_feature) || !__has_feature(objc_arc) | 15 #if !defined(__has_feature) || !__has_feature(objc_arc) |
| 16 #error "This file requires ARC support." | 16 #error "This file requires ARC support." |
| 17 #endif | 17 #endif |
| 18 | 18 |
| 19 IOSChromeMetricsHelper::IOSChromeMetricsHelper( | 19 IOSChromeMetricsHelper::IOSChromeMetricsHelper( |
| 20 web::WebState* web_state, | 20 web::WebState* web_state, |
| 21 const GURL& request_url, | 21 const GURL& request_url, |
| 22 const security_interstitials::MetricsHelper::ReportDetails report_details) | 22 const security_interstitials::MetricsHelper::ReportDetails report_details) |
| 23 : security_interstitials::MetricsHelper( | 23 : security_interstitials::MetricsHelper( |
| 24 request_url, | 24 request_url, |
| 25 report_details, | 25 report_details, |
| 26 ios::HistoryServiceFactory::GetForBrowserState( | 26 ios::HistoryServiceFactory::GetForBrowserState( |
| 27 ios::ChromeBrowserState::FromBrowserState( | 27 ios::ChromeBrowserState::FromBrowserState( |
| 28 web_state->GetBrowserState()), | 28 web_state->GetBrowserState()), |
| 29 ServiceAccessType::EXPLICIT_ACCESS), | 29 ServiceAccessType::EXPLICIT_ACCESS), |
| 30 GetApplicationContext()->GetRapporService() | 30 GetApplicationContext()->GetRapporServiceImpl() |
| 31 ? GetApplicationContext()->GetRapporService()->AsWeakPtr() | 31 ? GetApplicationContext()->GetRapporServiceImpl()->AsWeakPtr() |
| 32 : base::WeakPtr<rappor::RapporService>()) {} | 32 : base::WeakPtr<rappor::RapporService>()) {} |
| 33 | 33 |
| 34 IOSChromeMetricsHelper::~IOSChromeMetricsHelper() {} | 34 IOSChromeMetricsHelper::~IOSChromeMetricsHelper() {} |
| 35 | 35 |
| 36 void IOSChromeMetricsHelper::RecordExtraUserDecisionMetrics( | 36 void IOSChromeMetricsHelper::RecordExtraUserDecisionMetrics( |
| 37 security_interstitials::MetricsHelper::Decision decision) {} | 37 security_interstitials::MetricsHelper::Decision decision) {} |
| 38 | 38 |
| 39 void IOSChromeMetricsHelper::RecordExtraUserInteractionMetrics( | 39 void IOSChromeMetricsHelper::RecordExtraUserInteractionMetrics( |
| 40 security_interstitials::MetricsHelper::Interaction interaction) {} | 40 security_interstitials::MetricsHelper::Interaction interaction) {} |
| 41 | 41 |
| 42 void IOSChromeMetricsHelper::RecordExtraShutdownMetrics() {} | 42 void IOSChromeMetricsHelper::RecordExtraShutdownMetrics() {} |
| OLD | NEW |