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

Unified Diff: ui/webui/resources/cr_elements/network/cr_onc_types.js

Issue 2311473002: MD Settings: Third party VPN support (Closed)
Patch Set: Rebase Created 4 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: ui/webui/resources/cr_elements/network/cr_onc_types.js
diff --git a/ui/webui/resources/cr_elements/network/cr_onc_types.js b/ui/webui/resources/cr_elements/network/cr_onc_types.js
index 7abb4310712f6a76ede592b87eb412f17263a0ac..6423360fa2b1c4e9bc491f961ba10d2b6c4e8aa5 100644
--- a/ui/webui/resources/cr_elements/network/cr_onc_types.js
+++ b/ui/webui/resources/cr_elements/network/cr_onc_types.js
@@ -314,22 +314,22 @@ CrOnc.getAutoConnect = function(properties) {
/**
* @param {!CrOnc.NetworkProperties|!CrOnc.NetworkStateProperties|undefined}
* properties The ONC network properties or state properties.
- * @param {!Object<function(string, ...string):string>} i18n
+ * @param {!I18nBehavior.Proto} i18nBehavior An I18nBehavior instance.
* @return {string} The name to display for |network|.
*/
-CrOnc.getNetworkName = function(properties, i18n) {
+CrOnc.getNetworkName = function(properties, i18nBehavior) {
if (!properties)
return '';
let name = CrOnc.getStateOrActiveString(properties.Name);
let type = CrOnc.getStateOrActiveString(properties.Type);
if (!name)
- return i18n.call('OncType' + type);
+ return i18nBehavior.i18n('OncType' + type);
if (type == 'VPN' && properties.VPN) {
let vpnType = CrOnc.getStateOrActiveString(properties.VPN.Type);
if (vpnType == 'ThirdPartyVPN' && properties.VPN.ThirdPartyVPN) {
let providerName = properties.VPN.ThirdPartyVPN.ProviderName;
if (providerName)
- return i18n.call('vpnNameTemplate', providerName, name);
+ return i18nBehavior.i18n('vpnNameTemplate', providerName, name);
}
}
return name;
« no previous file with comments | « ui/webui/resources/cr_elements/network/cr_network_list_item.js ('k') | ui/webui/resources/js/i18n_behavior.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698