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 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
158 | 158 |
159 void ChromeControllerClient::GoBack() { | 159 void ChromeControllerClient::GoBack() { |
160 interstitial_page_->DontProceed(); | 160 interstitial_page_->DontProceed(); |
161 } | 161 } |
162 | 162 |
163 void ChromeControllerClient::Proceed() { | 163 void ChromeControllerClient::Proceed() { |
164 interstitial_page_->Proceed(); | 164 interstitial_page_->Proceed(); |
165 } | 165 } |
166 | 166 |
167 void ChromeControllerClient::Reload() { | 167 void ChromeControllerClient::Reload() { |
168 web_contents_->GetController().Reload(true); | 168 web_contents_->GetController().Reload(content::ReloadType::NORMAL, true); |
169 } | 169 } |
170 | 170 |
171 void ChromeControllerClient::OpenUrlInCurrentTab(const GURL& url) { | 171 void ChromeControllerClient::OpenUrlInCurrentTab(const GURL& url) { |
172 content::OpenURLParams params(url, Referrer(), | 172 content::OpenURLParams params(url, Referrer(), |
173 WindowOpenDisposition::CURRENT_TAB, | 173 WindowOpenDisposition::CURRENT_TAB, |
174 ui::PAGE_TRANSITION_LINK, false); | 174 ui::PAGE_TRANSITION_LINK, false); |
175 web_contents_->OpenURL(params); | 175 web_contents_->OpenURL(params); |
176 } | 176 } |
177 | 177 |
178 const std::string& ChromeControllerClient::GetApplicationLocale() { | 178 const std::string& ChromeControllerClient::GetApplicationLocale() { |
179 return g_browser_process->GetApplicationLocale(); | 179 return g_browser_process->GetApplicationLocale(); |
180 } | 180 } |
181 | 181 |
182 PrefService* ChromeControllerClient::GetPrefService() { | 182 PrefService* ChromeControllerClient::GetPrefService() { |
183 Profile* profile = | 183 Profile* profile = |
184 Profile::FromBrowserContext(web_contents_->GetBrowserContext()); | 184 Profile::FromBrowserContext(web_contents_->GetBrowserContext()); |
185 return profile->GetPrefs(); | 185 return profile->GetPrefs(); |
186 } | 186 } |
187 | 187 |
188 const std::string ChromeControllerClient::GetExtendedReportingPrefName() { | 188 const std::string ChromeControllerClient::GetExtendedReportingPrefName() { |
189 return safe_browsing::GetExtendedReportingPrefName(*GetPrefService()); | 189 return safe_browsing::GetExtendedReportingPrefName(*GetPrefService()); |
190 } | 190 } |
OLD | NEW |