Commit 4cdf1a71 authored by Steven Bennetts's avatar Steven Bennetts Committed by Commit Bot

Eliminate disable-network-settings-config and networkSettingsConfig

This CL eliminates the deprecated --disable-network-settings-config
flag and the networkSettingsConfig JS property.

The NetworkConfigView and related code will be eliminated in a
followup.

For comment-only change to ash/public/interfaces/system_tray.mojom:
TBR=tsepez@chromium.org

Bug: 848090
Cq-Include-Trybots: luci.chromium.try:closure_compilation
Change-Id: I63bd4c79fc3041c1e6b25769fd2cc755664f4247
Reviewed-on: https://chromium-review.googlesource.com/1103057
Commit-Queue: Steven Bennetts <stevenjb@chromium.org>
Reviewed-by: default avatarJames Cook <jamescook@chromium.org>
Reviewed-by: default avatarToni Barzic <tbarzic@chromium.org>
Cr-Commit-Position: refs/heads/master@{#568298}
parent e50f482d
......@@ -116,9 +116,8 @@ interface SystemTrayClient {
// which may include showing payment or captive portal UI when appropriate.
ShowNetworkConfigure(string network_id);
// Shows UI to create a new network connection. The |type| is a Shill/Flimflam
// network type from third_party/cros_system_api/dbus/shill/dbus-constants.h
// ('wifi', 'cellular', etc.).
// Shows UI to create a new network connection. |type| is the ONC network type
// (see onc_spec.md). TODO(stevenjb): Use NetworkType from onc.mojo (TBD).
ShowNetworkCreate(string type);
// Shows the "add network" UI to create a third-party extension-backed VPN
......
include_rules = [
"+components/device_event_log",
"+components/onc",
"+third_party/cros_system_api",
]
......
......@@ -45,6 +45,7 @@
#include "chromeos/network/network_state_handler_observer.h"
#include "chromeos/network/proxy/ui_proxy_config_service.h"
#include "components/device_event_log/device_event_log.h"
#include "components/onc/onc_constants.h"
#include "device/bluetooth/bluetooth_adapter_factory.h"
#include "third_party/cros_system_api/dbus/service_constants.h"
#include "third_party/skia/include/core/SkColor.h"
......@@ -480,7 +481,7 @@ class WifiHeaderRowView : public NetworkListView::SectionHeaderRowView {
Shell::Get()->metrics()->RecordUserMetricsAction(
UMA_STATUS_AREA_NETWORK_JOIN_OTHER_CLICKED);
Shell::Get()->system_tray_controller()->ShowNetworkCreate(
shill::kTypeWifi);
::onc::network_type::kWiFi);
return;
}
SectionHeaderRowView::ButtonPressed(sender, event);
......
......@@ -27,6 +27,7 @@
#include "chromeos/network/network_handler.h"
#include "chromeos/network/network_state.h"
#include "chromeos/network/network_type_pattern.h"
#include "components/onc/onc_constants.h"
#include "third_party/cros_system_api/dbus/service_constants.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/gfx/image/image_skia.h"
......@@ -117,7 +118,7 @@ class VPNListProviderEntry : public views::ButtonListener, public views::View {
Shell::Get()->metrics()->RecordUserMetricsAction(
UMA_STATUS_AREA_VPN_ADD_BUILT_IN_CLICKED);
Shell::Get()->system_tray_controller()->ShowNetworkCreate(
shill::kTypeVPN);
::onc::network_type::kVPN);
}
}
......
......@@ -1453,11 +1453,6 @@ const FeatureEntry kFeatureEntries[] = {
flag_descriptions::kEnableCaptivePortalRandomUrl,
flag_descriptions::kEnableCaptivePortalRandomUrlDescription, kOsCrOS,
SINGLE_VALUE_TYPE(chromeos::switches::kEnableCaptivePortalRandomUrl)},
{"disable-network-settings-config",
flag_descriptions::kDisableNetworkSettingsConfigName,
flag_descriptions::kDisableNetworkSettingsConfigDescription, kOsCrOS,
SINGLE_DISABLE_VALUE_TYPE(
chromeos::switches::kDisableNetworkSettingsConfig)},
#endif // OS_CHROMEOS
#if BUILDFLAG(ENABLE_PLUGINS)
{"allow-nacl-socket-api", flag_descriptions::kAllowNaclSocketApiName,
......
......@@ -2847,12 +2847,6 @@ const char kDisableLockScreenAppsDescription[] =
"not be able to launch the preferred note-taking action from the lock "
"screen, provided that the app supports lock screen note taking.";
const char kDisableNetworkSettingsConfigName[] =
"Disable Settings based Network Configuration";
const char kDisableNetworkSettingsConfigDescription[] =
"Disables the Settings based network configuration UI and restores the "
"Views based configuration dialog.";
const char kDisableSystemTimezoneAutomaticDetectionName[] =
"SystemTimezoneAutomaticDetection policy support";
const char kDisableSystemTimezoneAutomaticDetectionDescription[] =
......
......@@ -1749,9 +1749,6 @@ extern const char kCrosRegionsModeHide[];
extern const char kDisableLockScreenAppsName[];
extern const char kDisableLockScreenAppsDescription[];
extern const char kDisableNetworkSettingsConfigName[];
extern const char kDisableNetworkSettingsConfigDescription[];
extern const char kDisableSystemTimezoneAutomaticDetectionName[];
extern const char kDisableSystemTimezoneAutomaticDetectionDescription[];
......
......@@ -678,15 +678,14 @@ Polymer({
/** @private */
onConfigureTap_: function() {
if (this.networkProperties && this.isArcVpn_(this.networkProperties)) {
this.browserProxy_.showNetworkConfigure(this.guid);
if (this.networkProperties &&
(this.isThirdPartyVpn_(this.networkProperties) ||
this.isArcVpn_(this.networkProperties))) {
this.browserProxy_.configureThirdPartyVpn(this.guid);
return;
}
if (loadTimeData.getBoolean('networkSettingsConfig'))
this.fire('show-config', this.networkProperties);
else
chrome.send('configureNetwork', [this.guid]);
this.fire('show-config', this.networkProperties);
},
/** @private */
......@@ -1149,7 +1148,19 @@ Polymer({
*/
isArcVpn_: function(networkProperties) {
return !!networkProperties.VPN &&
CrOnc.getActiveValue(networkProperties.VPN.Type) == 'ARCVPN';
CrOnc.getActiveValue(networkProperties.VPN.Type) ==
CrOnc.VPNType.ARCVPN;
},
/**
* @param {!CrOnc.NetworkProperties} networkProperties
* @return {boolean}
* @private
*/
isThirdPartyVpn_: function(networkProperties) {
return !!networkProperties.VPN &&
CrOnc.getActiveValue(networkProperties.VPN.Type) ==
CrOnc.VPNType.THIRD_PARTY_VPN;
},
/**
......@@ -1184,6 +1195,6 @@ Polymer({
return false;
}
return true;
}
},
});
})();
......@@ -332,12 +332,7 @@ Polymer({
* @private
*/
getAddNetworkClass_: function(type) {
if (loadTimeData.getBoolean('networkSettingsConfig')) {
if (type == CrOnc.Type.WI_FI)
return 'icon-add-wifi';
return 'icon-add-circle';
}
return 'icon-external';
return type == CrOnc.Type.WI_FI ? 'icon-add-wifi' : 'icon-add-circle';
},
/**
......@@ -381,18 +376,12 @@ Polymer({
/** @private */
onAddWiFiTap_: function() {
if (loadTimeData.getBoolean('networkSettingsConfig'))
this.showConfig_(true /* configAndConnect */, CrOnc.Type.WI_FI);
else
chrome.send('addNetwork', [CrOnc.Type.WI_FI]);
this.showConfig_(true /* configAndConnect */, CrOnc.Type.WI_FI);
},
/** @private */
onAddVPNTap_: function() {
if (loadTimeData.getBoolean('networkSettingsConfig'))
this.showConfig_(true /* configAndConnect */, CrOnc.Type.VPN);
else
chrome.send('addNetwork', [CrOnc.Type.VPN]);
this.showConfig_(true /* configAndConnect */, CrOnc.Type.VPN);
},
/**
......@@ -403,7 +392,7 @@ Polymer({
*/
onAddThirdPartyVpnTap_: function(event) {
const provider = event.model.item;
this.browserProxy_.addThirdPartyVpn(CrOnc.Type.VPN, provider.ExtensionID);
this.browserProxy_.addThirdPartyVpn(provider.ExtensionID);
},
/** @private */
......
......@@ -19,17 +19,18 @@ cr.define('settings', function() {
/** @interface */
class InternetPageBrowserProxy {
/**
* Shows configuration of connected external VPN network.
* @param {string} guid
* Shows configuration for external VPNs. Includes ThirdParty (extension
* configured) VPNs, and Arc VPNs.
* @param {string} guid
*/
showNetworkConfigure(guid) {}
configureThirdPartyVpn(guid) {}
/**
* Sends add VPN request to external VPN provider.
* @param {string} networkType
* Sends an add VPN request to the external VPN provider (ThirdParty VPN
* extension or Arc VPN provider app).
* @param {string} appId
*/
addThirdPartyVpn(networkType, appId) {}
addThirdPartyVpn(appId) {}
/**
* Requests Chrome to send list of Arc VPN providers.
......@@ -66,13 +67,13 @@ cr.define('settings', function() {
*/
class InternetPageBrowserProxyImpl {
/** @override */
showNetworkConfigure(guid) {
chrome.send('configureNetwork', [guid]);
configureThirdPartyVpn(guid) {
chrome.send('configureThirdPartyVpn', [guid]);
}
/** @override */
addThirdPartyVpn(networkType, appId) {
chrome.send('addNetwork', [networkType, appId]);
addThirdPartyVpn(appId) {
chrome.send('addThirdPartyVpn', [appId]);
}
/** @override */
......
......@@ -403,10 +403,7 @@ Polymer({
assert(this.deviceState);
const type = this.deviceState.Type;
assert(type != CrOnc.Type.CELLULAR);
if (loadTimeData.getBoolean('networkSettingsConfig'))
this.fire('show-config', {GUID: '', Type: type});
else
chrome.send('addNetwork', [type]);
this.fire('show-config', {GUID: '', Type: type});
},
/**
......@@ -417,19 +414,16 @@ Polymer({
*/
onAddThirdPartyVpnTap_: function(event) {
const provider = event.model.item;
this.browserProxy_.addThirdPartyVpn(CrOnc.Type.VPN, provider.ExtensionID);
this.browserProxy_.addThirdPartyVpn(provider.ExtensionID);
},
/**
* @param {!{model:
* !{item: !settings.ArcVpnProvider},
* }} event
* @param {!{model: !{item: !settings.ArcVpnProvider}}} event
* @private
*/
onAddArcVpnTap_: function(event) {
const provider = event.model.item;
settings.InternetPageBrowserProxyImpl.getInstance().addThirdPartyVpn(
CrOnc.Type.VPN, provider.AppID);
this.browserProxy_.addThirdPartyVpn(provider.AppID);
},
/**
......
......@@ -15,7 +15,6 @@
#include "chrome/browser/browser_process_platform_part.h"
#include "chrome/browser/chromeos/accessibility/accessibility_manager.h"
#include "chrome/browser/chromeos/login/help_app_launcher.h"
#include "chrome/browser/chromeos/options/network_config_view.h"
#include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h"
#include "chrome/browser/chromeos/policy/device_cloud_policy_manager_chromeos.h"
#include "chrome/browser/chromeos/profiles/profile_helper.h"
......@@ -41,6 +40,7 @@
#include "chromeos/network/network_state.h"
#include "chromeos/network/network_state_handler.h"
#include "chromeos/network/network_util.h"
#include "chromeos/network/onc/onc_utils.h"
#include "chromeos/network/tether_constants.h"
#include "components/arc/arc_bridge_service.h"
#include "components/arc/arc_service_manager.h"
......@@ -63,8 +63,8 @@
using chromeos::DBusThreadManager;
using chromeos::UpdateEngineClient;
using session_manager::SessionState;
using session_manager::SessionManager;
using session_manager::SessionState;
using views::Widget;
namespace {
......@@ -339,31 +339,21 @@ void SystemTrayClient::ShowNetworkConfigure(const std::string& network_id) {
return;
}
if (chromeos::switches::IsNetworkSettingsConfigEnabled())
chromeos::InternetConfigDialog::ShowDialogForNetworkId(network_id);
else
chromeos::NetworkConfigView::ShowForNetworkId(network_id);
chromeos::InternetConfigDialog::ShowDialogForNetworkId(network_id);
}
void SystemTrayClient::ShowNetworkCreate(const std::string& type) {
if (type == shill::kTypeCellular) {
if (type == ::onc::network_type::kCellular) {
const chromeos::NetworkState* cellular =
chromeos::NetworkHandler::Get()
->network_state_handler()
->FirstNetworkByType(chromeos::NetworkTypePattern::Primitive(type));
->FirstNetworkByType(
chromeos::onc::NetworkTypePatternFromOncType(type));
std::string network_id = cellular ? cellular->guid() : "";
ShowNetworkSettingsHelper(network_id, false /* show_configure */);
return;
}
if (chromeos::switches::IsNetworkSettingsConfigEnabled()) {
// TODO(stevenjb): Pass ONC type to ShowNetworkCreate once NetworkConfigView
// is deprecated.
std::string onc_type =
chromeos::network_util::TranslateShillTypeToONC(type);
chromeos::InternetConfigDialog::ShowDialogForNetworkType(onc_type);
} else {
chromeos::NetworkConfigView::ShowForType(type);
}
chromeos::InternetConfigDialog::ShowDialogForNetworkType(type);
}
void SystemTrayClient::ShowThirdPartyVpnCreate(
......
......@@ -4,7 +4,6 @@
#include "chrome/browser/ui/webui/chromeos/login/network_dropdown_handler.h"
#include "chrome/browser/chromeos/options/network_config_view.h"
#include "chrome/browser/ui/webui/chromeos/internet_config_dialog.h"
#include "chrome/browser/ui/webui/chromeos/internet_detail_dialog.h"
#include "chromeos/chromeos_switches.h"
......@@ -59,12 +58,8 @@ void NetworkDropdownHandler::HandleLaunchAddWiFiNetworkDialog() {
handler->SetTechnologyEnabled(NetworkTypePattern::WiFi(), true,
network_handler::ErrorCallback());
}
if (chromeos::switches::IsNetworkSettingsConfigEnabled()) {
chromeos::InternetConfigDialog::ShowDialogForNetworkType(
::onc::network_type::kWiFi);
} else {
NetworkConfigView::ShowForType(shill::kTypeWifi);
}
chromeos::InternetConfigDialog::ShowDialogForNetworkType(
::onc::network_type::kWiFi);
}
void NetworkDropdownHandler::HandleShowNetworkDetails(
......@@ -89,10 +84,7 @@ void NetworkDropdownHandler::HandleShowNetworkConfig(
const base::ListValue* args) {
std::string guid;
args->GetString(0, &guid);
if (chromeos::switches::IsNetworkSettingsConfigEnabled())
chromeos::InternetConfigDialog::ShowDialogForNetworkId(guid);
else
NetworkConfigView::ShowForNetworkId(guid);
chromeos::InternetConfigDialog::ShowDialogForNetworkId(guid);
}
} // namespace chromeos
......@@ -9,12 +9,12 @@
#include "base/bind.h"
#include "base/values.h"
#include "chrome/browser/chromeos/options/network_config_view.h"
#include "chrome/browser/chromeos/profiles/profile_helper.h"
#include "chrome/browser/chromeos/tether/tether_service.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/app_list/arc/arc_app_list_prefs.h"
#include "chrome/browser/ui/app_list/arc/arc_app_utils.h"
#include "chromeos/network/network_event_log.h"
#include "chromeos/network/network_state.h"
#include "chromeos/network/network_state_handler.h"
#include "components/arc/arc_bridge_service.h"
......@@ -33,8 +33,8 @@ namespace chromeos {
namespace {
const char kAddNetworkMessage[] = "addNetwork";
const char kConfigureNetworkMessage[] = "configureNetwork";
const char kAddThirdPartyVpnMessage[] = "addThirdPartyVpn";
const char kConfigureThirdPartyVpnMessage[] = "configureThirdPartyVpn";
const char kRequestArcVpnProviders[] = "requestArcVpnProviders";
const char kSendArcVpnProviders[] = "sendArcVpnProviders";
const char kRequestGmsCoreNotificationsDisabledDeviceNames[] =
......@@ -42,13 +42,6 @@ const char kRequestGmsCoreNotificationsDisabledDeviceNames[] =
const char kSendGmsCoreNotificationsDisabledDeviceNames[] =
"sendGmsCoreNotificationsDisabledDeviceNames";
std::string ServicePathFromGuid(const std::string& guid) {
const NetworkState* network =
NetworkHandler::Get()->network_state_handler()->GetNetworkStateFromGuid(
guid);
return network ? network->path() : "";
}
Profile* GetProfileForPrimaryUser() {
return ProfileHelper::Get()->GetProfileByUser(
user_manager::UserManager::Get()->GetPrimaryUser());
......@@ -93,14 +86,13 @@ InternetHandler::~InternetHandler() {
}
void InternetHandler::RegisterMessages() {
// TODO(stevenjb): Eliminate once network configuration UI is integrated
// into settings.
web_ui()->RegisterMessageCallback(
kAddNetworkMessage, base::BindRepeating(&InternetHandler::AddNetwork,
base::Unretained(this)));
kAddThirdPartyVpnMessage,
base::BindRepeating(&InternetHandler::AddThirdPartyVpn,
base::Unretained(this)));
web_ui()->RegisterMessageCallback(
kConfigureNetworkMessage,
base::BindRepeating(&InternetHandler::ConfigureNetwork,
kConfigureThirdPartyVpnMessage,
base::BindRepeating(&InternetHandler::ConfigureThirdPartyVpn,
base::Unretained(this)));
web_ui()->RegisterMessageCallback(
kRequestArcVpnProviders,
......@@ -142,85 +134,80 @@ void InternetHandler::OnGmsCoreNotificationStateChanged() {
SetGmsCoreNotificationsDisabledDeviceNames();
}
void InternetHandler::AddNetwork(const base::ListValue* args) {
std::string onc_type;
if (args->GetSize() < 1 || !args->GetString(0, &onc_type)) {
NOTREACHED() << "Invalid args for: " << kAddNetworkMessage;
void InternetHandler::AddThirdPartyVpn(const base::ListValue* args) {
std::string app_id;
if (args->GetSize() < 1 || !args->GetString(0, &app_id)) {
NOTREACHED() << "Invalid args for: " << kAddThirdPartyVpnMessage;
return;
}
if (app_id.empty()) {
NET_LOG(ERROR) << "Empty app id for " << kAddThirdPartyVpnMessage;
return;
}
if (profile_ != GetProfileForPrimaryUser()) {
NET_LOG(ERROR) << "Only the primary user can add VPNs";
return;
}
if (onc_type == ::onc::network_type::kVPN) {
std::string app_id;
if (args->GetSize() >= 2)
args->GetString(1, &app_id);
if (app_id.empty()) {
// Show the "add network" dialog for the built-in OpenVPN/L2TP provider.
NetworkConfigView::ShowForType(shill::kTypeVPN);
return;
}
// Request to launch Arc VPN provider.
const auto* arc_app_list_prefs = ArcAppListPrefs::Get(profile_);
if (arc_app_list_prefs && arc_app_list_prefs->GetApp(app_id)) {
arc::LaunchApp(profile_, app_id, ui::EF_NONE);
return;
}
// Request that the third-party VPN provider identified by |provider_id|
// show its "add network" dialog.
VpnServiceFactory::GetForBrowserContext(GetProfileForPrimaryUser())
->SendShowAddDialogToExtension(app_id);
} else if (onc_type == ::onc::network_type::kWiFi) {
NetworkConfigView::ShowForType(shill::kTypeWifi);
} else {
LOG(ERROR) << "Unsupported type for: " << kAddNetworkMessage;
// Request to launch Arc VPN provider.
const auto* arc_app_list_prefs = ArcAppListPrefs::Get(profile_);
if (arc_app_list_prefs && arc_app_list_prefs->GetApp(app_id)) {
arc::LaunchApp(profile_, app_id, ui::EF_NONE);
return;
}
// Request that the third-party VPN provider identified by |provider_id|
// show its "add network" dialog.
VpnServiceFactory::GetForBrowserContext(GetProfileForPrimaryUser())
->SendShowAddDialogToExtension(app_id);
}
void InternetHandler::ConfigureNetwork(const base::ListValue* args) {
void InternetHandler::ConfigureThirdPartyVpn(const base::ListValue* args) {
std::string guid;
if (args->GetSize() < 1 || !args->GetString(0, &guid)) {
NOTREACHED() << "Invalid args for: " << kConfigureNetworkMessage;
NOTREACHED() << "Invalid args for: " << kConfigureThirdPartyVpnMessage;
return;
}
const std::string service_path = ServicePathFromGuid(guid);
if (service_path.empty()) {
LOG(ERROR) << "Network not found: " << guid;
if (profile_ != GetProfileForPrimaryUser()) {
NET_LOG(ERROR) << "Only the primary user can configure VPNs";
return;
}
const NetworkState* network =
NetworkHandler::Get()->network_state_handler()->GetNetworkState(
service_path);
NetworkHandler::Get()->network_state_handler()->GetNetworkStateFromGuid(
guid);
if (!network) {
LOG(ERROR) << "Network not found with service_path: " << service_path;
NET_LOG(ERROR) << "ConfigureThirdPartyVpn: Network not found: " << guid;
return;
}
if (network->type() != shill::kTypeVPN) {
NET_LOG(ERROR) << "ConfigureThirdPartyVpn: Network is not a VPN: " << guid;
return;
}
if (network->type() == shill::kTypeVPN) {
if (profile_ != GetProfileForPrimaryUser())
return;
if (network->vpn_provider_type() == shill::kProviderThirdPartyVpn) {
// Request that the third-party VPN provider used by the |network| show a
// configuration dialog for it.
VpnServiceFactory::GetForBrowserContext(profile_)
->SendShowConfigureDialogToExtension(network->vpn_provider_id(),
network->name());
return;
}
if (network->vpn_provider_type() == shill::kProviderThirdPartyVpn) {
// Request that the third-party VPN provider used by the |network| show a
// configuration dialog for it.
VpnServiceFactory::GetForBrowserContext(profile_)
->SendShowConfigureDialogToExtension(network->vpn_provider_id(),
network->name());
return;
} else if (network->vpn_provider_type() == shill::kProviderArcVpn) {
auto* net_instance = ARC_GET_INSTANCE_FOR_METHOD(
arc::ArcServiceManager::Get()->arc_bridge_service()->net(),
ConfigureAndroidVpn);
if (!net_instance) {
LOG(ERROR) << "User requested VPN configuration but API is unavailable";
return;
}
net_instance->ConfigureAndroidVpn();
if (network->vpn_provider_type() == shill::kProviderArcVpn) {
auto* net_instance = ARC_GET_INSTANCE_FOR_METHOD(
arc::ArcServiceManager::Get()->arc_bridge_service()->net(),
ConfigureAndroidVpn);
if (!net_instance) {
NET_LOG(ERROR) << "ConfigureThirdPartyVpn: API is unavailable";
return;
}
net_instance->ConfigureAndroidVpn();
return;
}
NetworkConfigView::ShowForNetworkId(network->guid());
NET_LOG(ERROR) << "ConfigureThirdPartyVpn: Unsupported VPN type: "
<< network->vpn_provider_type() << " For: " << guid;
}
void InternetHandler::RequestArcVpnProviders(const base::ListValue* args) {
......
......@@ -24,8 +24,6 @@ class GmsCoreNotificationsStateTracker;
namespace settings {
// Chrome OS Internet settings page UI handler.
// TODO(lgcheng/stevenjb): Rename this ThirdPartyVpnHandler once configuration
// is handled in the Settings UI (crbug.com/380937
class InternetHandler
: public app_list::ArcVpnProviderManager::Observer,
public chromeos::tether::GmsCoreNotificationsStateTracker::Observer,
......@@ -55,8 +53,8 @@ class InternetHandler
friend class InternetHandlerTest;
// Settings JS handlers.
void AddNetwork(const base::ListValue* args);
void ConfigureNetwork(const base::ListValue* args);
void AddThirdPartyVpn(const base::ListValue* args);
void ConfigureThirdPartyVpn(const base::ListValue* args);
void RequestArcVpnProviders(const base::ListValue* args);
void RequestGmsCoreNotificationsDisabledDeviceNames(
const base::ListValue* args);
......
......@@ -1241,8 +1241,6 @@ void AddInternetStrings(content::WebUIDataSource* html_source) {
AddLocalizedStringsBulk(html_source, localized_strings,
arraysize(localized_strings));
html_source->AddBoolean("networkSettingsConfig",
chromeos::switches::IsNetworkSettingsConfigEnabled());
html_source->AddString("networkGoogleNameserversLearnMoreUrl",
chrome::kGoogleNameserversLearnMoreURL);
html_source->AddString(
......
......@@ -249,9 +249,6 @@ const char kDisableMultiDisplayLayout[] = "disable-multi-display-layout";
const char kDisableNetworkPortalNotification[] =
"disable-network-portal-notification";
// Disables Settings based network configuration dialogs.
const char kDisableNetworkSettingsConfig[] = "disable-network-settings-config";
// Disables the new Korean IME in chrome://settings/languages.
const char kDisableNewKoreanIme[] = "disable-new-korean-ime";
......@@ -740,11 +737,6 @@ bool IsSigninFrameClientCertUserSelectionEnabled() {
kDisableSigninFrameClientCertUserSelection);
}
bool IsNetworkSettingsConfigEnabled() {
return !base::CommandLine::ForCurrentProcess()->HasSwitch(
chromeos::switches::kDisableNetworkSettingsConfig);
}
bool AreExperimentalAccessibilityFeaturesEnabled() {
return base::CommandLine::ForCurrentProcess()->HasSwitch(
chromeos::switches::kEnableExperimentalAccessibilityFeatures);
......
......@@ -74,7 +74,6 @@ CHROMEOS_EXPORT extern const char kDisableMachineCertRequest[];
CHROMEOS_EXPORT extern const char kDisableMtpWriteSupport[];
CHROMEOS_EXPORT extern const char kDisableMultiDisplayLayout[];
CHROMEOS_EXPORT extern const char kDisableNetworkPortalNotification[];
CHROMEOS_EXPORT extern const char kDisableNetworkSettingsConfig[];
CHROMEOS_EXPORT extern const char kDisableNewKoreanIme[];
CHROMEOS_EXPORT extern const char kDisableNewZIPUnpacker[];
CHROMEOS_EXPORT extern const char kDisableOfficeEditingComponentApp[];
......@@ -207,9 +206,6 @@ CHROMEOS_EXPORT bool IsAssistantFlagsEnabled();
// Returns true if Google Assistant is enabled.
CHROMEOS_EXPORT bool IsAssistantEnabled();
// Returns true if Settings based network configuration is enabled.
CHROMEOS_EXPORT bool IsNetworkSettingsConfigEnabled();
// Returns true if Zip Archiver is enabled for unpacking files.
CHROMEOS_EXPORT bool IsZipArchiverUnpackerEnabled();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment