Chromium Code Reviews| Index: components/security_interstitials/content/security_interstitial_page.cc |
| diff --git a/components/security_interstitials/content/security_interstitial_page.cc b/components/security_interstitials/content/security_interstitial_page.cc |
| index 6ff9b3a9ac5a82ac4f91ea2164dcbf8362ed3e07..5f6db08f2906ccd5cf19dd31c61b8140344124b1 100644 |
| --- a/components/security_interstitials/content/security_interstitial_page.cc |
| +++ b/components/security_interstitials/content/security_interstitial_page.cc |
| @@ -35,8 +35,10 @@ SecurityInterstitialPage::SecurityInterstitialPage( |
| controller_(std::move(controller)) { |
| // Determine if any prefs need to be updated prior to showing the security |
| // interstitial. |
| - safe_browsing::UpdatePrefsBeforeSecurityInterstitial( |
| - controller_->GetPrefService()); |
| + if (controller_->GetPrefService()) { |
|
meacer
2017/01/12 23:37:12
nit: In which cases can this be null? Might be use
sgurun-gerrit only
2017/01/12 23:52:54
Done.
|
| + safe_browsing::UpdatePrefsBeforeSecurityInterstitial( |
| + controller_->GetPrefService()); |
| + } |
| // Creating interstitial_page_ without showing it leaks memory, so don't |
| // create it here. |
| @@ -74,10 +76,6 @@ void SecurityInterstitialPage::Show() { |
| AfterShow(); |
| } |
| -bool SecurityInterstitialPage::IsPrefEnabled(const char* pref) { |
| - return controller_->GetPrefService()->GetBoolean(pref); |
| -} |
| - |
| SecurityInterstitialControllerClient* SecurityInterstitialPage::controller() { |
| return controller_.get(); |
| } |