| 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 "components/security_interstitials/core/metrics_helper.h" |
| 9 #include "ios/chrome/browser/application_context.h" | 9 #include "ios/chrome/browser/application_context.h" |
| 10 #include "ios/chrome/browser/browser_state/chrome_browser_state.h" | 10 #include "ios/chrome/browser/browser_state/chrome_browser_state.h" |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 void IOSChromeControllerClient::Reload() { | 56 void IOSChromeControllerClient::Reload() { |
| 57 web_state_->GetNavigationManager()->Reload(true); | 57 web_state_->GetNavigationManager()->Reload(true); |
| 58 } | 58 } |
| 59 | 59 |
| 60 void IOSChromeControllerClient::OpenUrlInCurrentTab(const GURL& url) { | 60 void IOSChromeControllerClient::OpenUrlInCurrentTab(const GURL& url) { |
| 61 web_state_->OpenURL(web::WebState::OpenURLParams( | 61 web_state_->OpenURL(web::WebState::OpenURLParams( |
| 62 url, web::Referrer(), WindowOpenDisposition::CURRENT_TAB, | 62 url, web::Referrer(), WindowOpenDisposition::CURRENT_TAB, |
| 63 ui::PAGE_TRANSITION_LINK, false)); | 63 ui::PAGE_TRANSITION_LINK, false)); |
| 64 } | 64 } |
| 65 | 65 |
| 66 const std::string& IOSChromeControllerClient::GetApplicationLocale() { | 66 const std::string& IOSChromeControllerClient::GetApplicationLocale() const { |
| 67 return GetApplicationContext()->GetApplicationLocale(); | 67 return GetApplicationContext()->GetApplicationLocale(); |
| 68 } | 68 } |
| 69 | 69 |
| 70 PrefService* IOSChromeControllerClient::GetPrefService() { | 70 PrefService* IOSChromeControllerClient::GetPrefService() { |
| 71 return ios::ChromeBrowserState::FromBrowserState( | 71 return ios::ChromeBrowserState::FromBrowserState( |
| 72 web_state_->GetBrowserState()) | 72 web_state_->GetBrowserState()) |
| 73 ->GetPrefs(); | 73 ->GetPrefs(); |
| 74 } | 74 } |
| 75 | 75 |
| 76 const std::string IOSChromeControllerClient::GetExtendedReportingPrefName() { | 76 const std::string IOSChromeControllerClient::GetExtendedReportingPrefName() |
| 77 const { |
| 77 return std::string(); | 78 return std::string(); |
| 78 } | 79 } |
| OLD | NEW |