Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2851)

Unified Diff: chrome/browser/interstitials/security_interstitial_page.cc

Issue 1481213003: Componentize the bad clock blocking page (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixing includes FOR REALSIES Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/interstitials/security_interstitial_page.cc
diff --git a/chrome/browser/interstitials/security_interstitial_page.cc b/chrome/browser/interstitials/security_interstitial_page.cc
index fd262680a21afe49e1ebac746db4040c5ebfd020..bba9e07ea6a3271bc7927f89121a340e3bbe043a 100644
--- a/chrome/browser/interstitials/security_interstitial_page.cc
+++ b/chrome/browser/interstitials/security_interstitial_page.cc
@@ -17,6 +17,7 @@
#include "chrome/grit/browser_resources.h"
#include "chrome/grit/generated_resources.h"
#include "components/grit/components_resources.h"
+#include "components/security_interstitials/core/common_string_util.h"
#include "components/security_interstitials/core/metrics_helper.h"
#include "components/url_formatter/url_formatter.h"
Peter Kasting 2015/12/02 01:14:40 Seems like this can be removed now?
felt 2015/12/02 03:30:38 Done.
#include "content/public/browser/interstitial_page.h"
@@ -65,6 +66,9 @@ void SecurityInterstitialPage::Show() {
if (!create_view_)
interstitial_page_->DontCreateViewForTesting();
interstitial_page_->Show();
+
+ controller_->set_interstitial_page(interstitial_page_);
+ AfterShow();
}
bool SecurityInterstitialPage::IsPrefEnabled(const char* pref) {
@@ -79,11 +83,8 @@ base::string16 SecurityInterstitialPage::GetFormattedHostName() const {
Profile::FromBrowserContext(web_contents()->GetBrowserContext());
if (profile)
languages = profile->GetPrefs()->GetString(prefs::kAcceptLanguages);
- base::string16 host =
- url_formatter::IDNToUnicode(request_url_.host(), languages);
- if (base::i18n::IsRTL())
- base::i18n::WrapStringWithLTRFormatting(&host);
- return host;
+ return security_interstitials::common_string_util::GetFormattedHostName(
+ request_url_, languages);
}
std::string SecurityInterstitialPage::GetHTMLContents() {

Powered by Google App Engine
This is Rietveld 408576698