| 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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 62   web_state_->GetNavigationManager()->Reload(web::ReloadType::NORMAL, | 62   web_state_->GetNavigationManager()->Reload(web::ReloadType::NORMAL, | 
| 63                                              true /*check_for_repost*/); | 63                                              true /*check_for_repost*/); | 
| 64 } | 64 } | 
| 65 | 65 | 
| 66 void IOSChromeControllerClient::OpenUrlInCurrentTab(const GURL& url) { | 66 void IOSChromeControllerClient::OpenUrlInCurrentTab(const GURL& url) { | 
| 67   web_state_->OpenURL(web::WebState::OpenURLParams( | 67   web_state_->OpenURL(web::WebState::OpenURLParams( | 
| 68       url, web::Referrer(), WindowOpenDisposition::CURRENT_TAB, | 68       url, web::Referrer(), WindowOpenDisposition::CURRENT_TAB, | 
| 69       ui::PAGE_TRANSITION_LINK, false)); | 69       ui::PAGE_TRANSITION_LINK, false)); | 
| 70 } | 70 } | 
| 71 | 71 | 
|  | 72 void IOSChromeControllerClient::OpenUrlInNewForegroundTab(const GURL& url) { | 
|  | 73   web_state_->OpenURL(web::WebState::OpenURLParams( | 
|  | 74       url, web::Referrer(), WindowOpenDisposition::NEW_FOREGROUND_TAB, | 
|  | 75       ui::PAGE_TRANSITION_LINK, false)); | 
|  | 76 } | 
|  | 77 | 
| 72 const std::string& IOSChromeControllerClient::GetApplicationLocale() const { | 78 const std::string& IOSChromeControllerClient::GetApplicationLocale() const { | 
| 73   return GetApplicationContext()->GetApplicationLocale(); | 79   return GetApplicationContext()->GetApplicationLocale(); | 
| 74 } | 80 } | 
| 75 | 81 | 
| 76 PrefService* IOSChromeControllerClient::GetPrefService() { | 82 PrefService* IOSChromeControllerClient::GetPrefService() { | 
| 77   return ios::ChromeBrowserState::FromBrowserState( | 83   return ios::ChromeBrowserState::FromBrowserState( | 
| 78              web_state_->GetBrowserState()) | 84              web_state_->GetBrowserState()) | 
| 79       ->GetPrefs(); | 85       ->GetPrefs(); | 
| 80 } | 86 } | 
| 81 | 87 | 
| 82 const std::string IOSChromeControllerClient::GetExtendedReportingPrefName() | 88 const std::string IOSChromeControllerClient::GetExtendedReportingPrefName() | 
| 83     const { | 89     const { | 
| 84   return std::string(); | 90   return std::string(); | 
| 85 } | 91 } | 
| OLD | NEW | 
|---|