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

Side by Side Diff: ios/chrome/browser/interstitials/ios_security_interstitial_page.mm

Issue 1841653003: Drop |languages| from {Format,Elide}Url* and IDNToUnicode (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix typo in elide_url.cc Created 4 years, 8 months 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 unified diff | Download patch
OLDNEW
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_security_interstitial_page.h" 5 #include "ios/chrome/browser/interstitials/ios_security_interstitial_page.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "components/grit/components_resources.h" 8 #include "components/grit/components_resources.h"
9 #include "components/prefs/pref_service.h" 9 #include "components/prefs/pref_service.h"
10 #include "components/security_interstitials/core/common_string_util.h" 10 #include "components/security_interstitials/core/common_string_util.h"
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 webui::SetLoadTimeDataDefaults( 46 webui::SetLoadTimeDataDefaults(
47 GetApplicationContext()->GetApplicationLocale(), &load_time_data); 47 GetApplicationContext()->GetApplicationLocale(), &load_time_data);
48 std::string html = ResourceBundle::GetSharedInstance() 48 std::string html = ResourceBundle::GetSharedInstance()
49 .GetRawDataResource(IDR_SECURITY_INTERSTITIAL_HTML) 49 .GetRawDataResource(IDR_SECURITY_INTERSTITIAL_HTML)
50 .as_string(); 50 .as_string();
51 webui::AppendWebUiCssTextDefaults(&html); 51 webui::AppendWebUiCssTextDefaults(&html);
52 return webui::GetI18nTemplateHtml(html, &load_time_data); 52 return webui::GetI18nTemplateHtml(html, &load_time_data);
53 } 53 }
54 54
55 base::string16 IOSSecurityInterstitialPage::GetFormattedHostName() const { 55 base::string16 IOSSecurityInterstitialPage::GetFormattedHostName() const {
56 ios::ChromeBrowserState* browser_state =
57 ios::ChromeBrowserState::FromBrowserState(web_state_->GetBrowserState());
58 std::string languages =
59 browser_state->GetPrefs()->GetString(prefs::kAcceptLanguages);
60 return security_interstitials::common_string_util::GetFormattedHostName( 56 return security_interstitials::common_string_util::GetFormattedHostName(
61 request_url_, languages); 57 request_url_);
62 } 58 }
63 59
64 bool IOSSecurityInterstitialPage::IsPrefEnabled(const char* pref_name) const { 60 bool IOSSecurityInterstitialPage::IsPrefEnabled(const char* pref_name) const {
65 ios::ChromeBrowserState* browser_state = 61 ios::ChromeBrowserState* browser_state =
66 ios::ChromeBrowserState::FromBrowserState(web_state_->GetBrowserState()); 62 ios::ChromeBrowserState::FromBrowserState(web_state_->GetBrowserState());
67 return browser_state->GetPrefs()->GetBoolean(pref_name); 63 return browser_state->GetPrefs()->GetBoolean(pref_name);
68 } 64 }
OLDNEW
« no previous file with comments | « ios/chrome/browser/history/history_service_factory.cc ('k') | ios/chrome/browser/ssl/ios_ssl_blocking_page.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698