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_controller_client.h" | 5 #include "ios/chrome/browser/interstitials/ios_chrome_controller_client.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "components/security_interstitials/core/metrics_helper.h" |
8 #include "ios/chrome/browser/application_context.h" | 9 #include "ios/chrome/browser/application_context.h" |
9 #include "ios/chrome/browser/browser_state/chrome_browser_state.h" | 10 #include "ios/chrome/browser/browser_state/chrome_browser_state.h" |
10 #include "ios/chrome/browser/pref_names.h" | 11 #include "ios/chrome/browser/pref_names.h" |
11 #include "ios/web/public/interstitials/web_interstitial.h" | 12 #include "ios/web/public/interstitials/web_interstitial.h" |
12 #import "ios/web/public/navigation_manager.h" | 13 #import "ios/web/public/navigation_manager.h" |
13 #include "ios/web/public/web_state/web_state.h" | 14 #include "ios/web/public/web_state/web_state.h" |
14 | 15 |
15 IOSChromeControllerClient::IOSChromeControllerClient(web::WebState* web_state) | 16 IOSChromeControllerClient::IOSChromeControllerClient( |
16 : web_state_(web_state), web_interstitial_(nullptr) {} | 17 web::WebState* web_state, |
| 18 std::unique_ptr<security_interstitials::MetricsHelper> metrics_helper) |
| 19 : security_interstitials::ControllerClient(std::move(metrics_helper)), |
| 20 web_state_(web_state), |
| 21 web_interstitial_(nullptr) {} |
17 | 22 |
18 IOSChromeControllerClient::~IOSChromeControllerClient() {} | 23 IOSChromeControllerClient::~IOSChromeControllerClient() {} |
19 | 24 |
20 void IOSChromeControllerClient::SetWebInterstitial( | 25 void IOSChromeControllerClient::SetWebInterstitial( |
21 web::WebInterstitial* web_interstitial) { | 26 web::WebInterstitial* web_interstitial) { |
22 web_interstitial_ = web_interstitial; | 27 web_interstitial_ = web_interstitial; |
23 } | 28 } |
24 | 29 |
25 bool IOSChromeControllerClient::CanLaunchDateAndTimeSettings() { | 30 bool IOSChromeControllerClient::CanLaunchDateAndTimeSettings() { |
26 return false; | 31 return false; |
(...skipping 29 matching lines...) Expand all Loading... |
56 | 61 |
57 PrefService* IOSChromeControllerClient::GetPrefService() { | 62 PrefService* IOSChromeControllerClient::GetPrefService() { |
58 return ios::ChromeBrowserState::FromBrowserState( | 63 return ios::ChromeBrowserState::FromBrowserState( |
59 web_state_->GetBrowserState()) | 64 web_state_->GetBrowserState()) |
60 ->GetPrefs(); | 65 ->GetPrefs(); |
61 } | 66 } |
62 | 67 |
63 const std::string IOSChromeControllerClient::GetExtendedReportingPrefName() { | 68 const std::string IOSChromeControllerClient::GetExtendedReportingPrefName() { |
64 return std::string(); | 69 return std::string(); |
65 } | 70 } |
OLD | NEW |