| 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 "chrome/browser/interstitials/chrome_controller_client.h" | 5 #include "chrome/browser/interstitials/chrome_controller_client.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/files/file_util.h" | 9 #include "base/files/file_util.h" |
| 10 #include "base/process/launch.h" | 10 #include "base/process/launch.h" |
| (...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 171 GURL(chrome::kChromeUINewTabURL), content::Referrer(), | 171 GURL(chrome::kChromeUINewTabURL), content::Referrer(), |
| 172 ui::PAGE_TRANSITION_AUTO_TOPLEVEL, std::string()); | 172 ui::PAGE_TRANSITION_AUTO_TOPLEVEL, std::string()); |
| 173 } | 173 } |
| 174 } | 174 } |
| 175 | 175 |
| 176 void ChromeControllerClient::Proceed() { | 176 void ChromeControllerClient::Proceed() { |
| 177 interstitial_page_->Proceed(); | 177 interstitial_page_->Proceed(); |
| 178 } | 178 } |
| 179 | 179 |
| 180 void ChromeControllerClient::Reload() { | 180 void ChromeControllerClient::Reload() { |
| 181 web_contents_->GetController().Reload(true); | 181 web_contents_->GetController().Reload(content::ReloadType::NORMAL, true); |
| 182 } | 182 } |
| 183 | 183 |
| 184 void ChromeControllerClient::OpenUrlInCurrentTab(const GURL& url) { | 184 void ChromeControllerClient::OpenUrlInCurrentTab(const GURL& url) { |
| 185 content::OpenURLParams params(url, Referrer(), | 185 content::OpenURLParams params(url, Referrer(), |
| 186 WindowOpenDisposition::CURRENT_TAB, | 186 WindowOpenDisposition::CURRENT_TAB, |
| 187 ui::PAGE_TRANSITION_LINK, false); | 187 ui::PAGE_TRANSITION_LINK, false); |
| 188 web_contents_->OpenURL(params); | 188 web_contents_->OpenURL(params); |
| 189 } | 189 } |
| 190 | 190 |
| 191 const std::string& ChromeControllerClient::GetApplicationLocale() { | 191 const std::string& ChromeControllerClient::GetApplicationLocale() { |
| 192 return g_browser_process->GetApplicationLocale(); | 192 return g_browser_process->GetApplicationLocale(); |
| 193 } | 193 } |
| 194 | 194 |
| 195 PrefService* ChromeControllerClient::GetPrefService() { | 195 PrefService* ChromeControllerClient::GetPrefService() { |
| 196 Profile* profile = | 196 Profile* profile = |
| 197 Profile::FromBrowserContext(web_contents_->GetBrowserContext()); | 197 Profile::FromBrowserContext(web_contents_->GetBrowserContext()); |
| 198 return profile->GetPrefs(); | 198 return profile->GetPrefs(); |
| 199 } | 199 } |
| 200 | 200 |
| 201 const std::string ChromeControllerClient::GetExtendedReportingPrefName() { | 201 const std::string ChromeControllerClient::GetExtendedReportingPrefName() { |
| 202 return safe_browsing::GetExtendedReportingPrefName(*GetPrefService()); | 202 return safe_browsing::GetExtendedReportingPrefName(*GetPrefService()); |
| 203 } | 203 } |
| OLD | NEW |