Commit 5e64ec48 authored by stevenjb@google.com's avatar stevenjb@google.com

Remove --enable-vpn (enabled always)

Include change to CrosMock::SetNetworkLibraryStatusAreaExpectations() so that tests pass.
Original CL+Review: http://codereview.chromium.org/7031040/

BUG=none
TEST=ChromeOS tests pass, 'Private networks' option should always show up in ChromeOS Networks menu.

Review URL: http://codereview.chromium.org/6992074

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@86703 0039d316-1c4b-4281-b951-d872f2087c98
parent adf96bbc
......@@ -295,18 +295,6 @@ const Experiment kExperiments[] = {
kOsAll,
SINGLE_VALUE_TYPE(switches::kPpapiFlashInProcess)
},
{
"enable-vpn",
IDS_FLAGS_ENABLE_VPN_NAME,
IDS_FLAGS_ENABLE_VPN_DESCRIPTION,
kOsCrOS,
#if defined(OS_CHROMEOS)
// The switch exists only on Chrome OS.
SINGLE_VALUE_TYPE(switches::kEnableVPN)
#else
SINGLE_VALUE_TYPE("")
#endif
},
{
"multi-profiles",
IDS_FLAGS_MULTI_PROFILES_NAME,
......
......@@ -276,6 +276,9 @@ void CrosMock::SetNetworkLibraryStatusAreaExpectations() {
EXPECT_CALL(*mock_network_library_, virtual_networks())
.Times(AnyNumber())
.WillRepeatedly((ReturnRef(virtual_networks_)));
EXPECT_CALL(*mock_network_library_, connected_network())
.Times(AnyNumber())
.WillRepeatedly((Return((const Network*)(NULL))));
// Set specific expectations for interesting functions:
......
......@@ -780,19 +780,17 @@ void MainMenuModel::InitMenuItems(bool is_browser_mode,
SkBitmap(), std::string(), FLAG_DISABLED));
}
if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kEnableVPN)) {
// If there's a connected network, add submenu for Private Networks.
const Network* connected_network = cros->connected_network();
if (connected_network) {
menu_items_.push_back(MenuItem()); // Separator
menu_items_.push_back(MenuItem(
ui::MenuModel::TYPE_SUBMENU,
l10n_util::GetStringUTF16(IDS_STATUSBAR_NETWORK_PRIVATE_NETWORKS),
VPNMenuModel::IconForDisplay(connected_network),
vpn_menu_model_.get(), FLAG_NONE));
vpn_menu_model_->InitMenuItems(
is_browser_mode, should_open_button_options);
}
// If there's a connected network, add submenu for Private Networks.
const Network* connected_network = cros->connected_network();
if (connected_network) {
menu_items_.push_back(MenuItem()); // Separator
menu_items_.push_back(MenuItem(
ui::MenuModel::TYPE_SUBMENU,
l10n_util::GetStringUTF16(IDS_STATUSBAR_NETWORK_PRIVATE_NETWORKS),
VPNMenuModel::IconForDisplay(connected_network),
vpn_menu_model_.get(), FLAG_NONE));
vpn_menu_model_->InitMenuItems(
is_browser_mode, should_open_button_options);
}
// Enable / disable wireless.
......
......@@ -1020,9 +1020,6 @@ const char kDOMLogin[] = "dom-login";
// Enables device policy support on ChromeOS.
const char kEnableDevicePolicy[] = "enable-device-policy";
// Enables VPN support on ChromeOS.
const char kEnableVPN[] = "enable-vpn";
// Enable the redirection of viewable document requests to the Google
// Document Viewer.
const char kEnableGView[] = "enable-gview";
......
......@@ -282,7 +282,6 @@ extern const char kWinHttpProxyResolver[];
#if defined(OS_CHROMEOS)
extern const char kDOMLogin[];
extern const char kEnableDevicePolicy[];
extern const char kEnableVPN[];
extern const char kEnableGView[];
extern const char kEnableLoginImages[];
extern const char kLoginManager[];
......
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