| Index: chrome/browser/chromeos/system/ash_system_tray_delegate.cc
|
| diff --git a/chrome/browser/chromeos/system/ash_system_tray_delegate.cc b/chrome/browser/chromeos/system/ash_system_tray_delegate.cc
|
| index 1580e0c2d50af568b9058a20740f578406d9eda1..d6a220df08746e78a1cf9202ba89bd44c8d3e52e 100644
|
| --- a/chrome/browser/chromeos/system/ash_system_tray_delegate.cc
|
| +++ b/chrome/browser/chromeos/system/ash_system_tray_delegate.cc
|
| @@ -488,24 +488,7 @@ class SystemTrayDelegate : public ash::SystemTrayDelegate,
|
| virtual void ShowNetworkSettings(const std::string& service_path) OVERRIDE {
|
| if (!LoginState::Get()->IsUserLoggedIn())
|
| return;
|
| -
|
| - std::string page = chrome::kInternetOptionsSubPage;
|
| - const chromeos::NetworkState* network = service_path.empty() ? NULL :
|
| - NetworkHandler::Get()->network_state_handler()->GetNetworkState(
|
| - service_path);
|
| - if (network) {
|
| - std::string name(network->name());
|
| - if (name.empty() && network->type() == flimflam::kTypeEthernet)
|
| - name = l10n_util::GetStringUTF8(IDS_STATUSBAR_NETWORK_DEVICE_ETHERNET);
|
| - page += base::StringPrintf(
|
| - "?servicePath=%s&networkType=%s&networkName=%s",
|
| - net::EscapeUrlEncodedData(service_path, true).c_str(),
|
| - net::EscapeUrlEncodedData(network->type(), true).c_str(),
|
| - net::EscapeUrlEncodedData(name, false).c_str());
|
| - }
|
| - content::RecordAction(
|
| - content::UserMetricsAction("OpenInternetOptionsDialog"));
|
| - chrome::ShowSettingsSubPage(GetAppropriateBrowser(), page);
|
| + network_connect::ShowNetworkSettings(service_path);
|
| }
|
|
|
| virtual void ShowBluetoothSettings() OVERRIDE {
|
| @@ -766,15 +749,12 @@ class SystemTrayDelegate : public ash::SystemTrayDelegate,
|
| network_connect::HandleUnconfiguredNetwork(network_id, GetNativeWindow());
|
| }
|
|
|
| - virtual void ConnectToNetwork(const std::string& network_id) OVERRIDE {
|
| - DCHECK(!CommandLine::ForCurrentProcess()->HasSwitch(
|
| - chromeos::switches::kUseNewNetworkConnectionHandler));
|
| - network_connect::ConnectResult result =
|
| - network_connect::ConnectToNetwork(network_id, GetNativeWindow());
|
| - if (result == network_connect::NETWORK_NOT_FOUND)
|
| - ShowNetworkSettings("");
|
| - else if (result == network_connect::CONNECT_NOT_STARTED)
|
| - ShowNetworkSettings(network_id);
|
| + virtual void EnrollOrConfigureNetwork(
|
| + const std::string& network_id,
|
| + gfx::NativeWindow parent_window) OVERRIDE {
|
| + if (network_connect::EnrollNetwork(network_id, parent_window))
|
| + return;
|
| + network_connect::HandleUnconfiguredNetwork(network_id, parent_window);
|
| }
|
|
|
| virtual void ManageBluetoothDevices() OVERRIDE {
|
| @@ -796,12 +776,16 @@ class SystemTrayDelegate : public ash::SystemTrayDelegate,
|
| SimDialogDelegate::SIM_DIALOG_UNLOCK);
|
| }
|
|
|
| + virtual void ShowMobileSetup(const std::string& network_id) OVERRIDE {
|
| + network_connect::ShowMobileSetup(network_id);
|
| + }
|
| +
|
| virtual void ShowOtherWifi() OVERRIDE {
|
| - NetworkConfigView::ShowForType(chromeos::TYPE_WIFI, GetNativeWindow());
|
| + NetworkConfigView::ShowForType(flimflam::kTypeWifi, GetNativeWindow());
|
| }
|
|
|
| virtual void ShowOtherVPN() OVERRIDE {
|
| - NetworkConfigView::ShowForType(chromeos::TYPE_VPN, GetNativeWindow());
|
| + NetworkConfigView::ShowForType(flimflam::kTypeVPN, GetNativeWindow());
|
| }
|
|
|
| virtual void ShowOtherCellular() OVERRIDE {
|
| @@ -1224,10 +1208,12 @@ class SystemTrayDelegate : public ash::SystemTrayDelegate,
|
| ash::NetworkObserver::MessageType message_type,
|
| size_t link_index) OVERRIDE {
|
| if (message_type == ash::NetworkObserver::ERROR_OUT_OF_CREDITS) {
|
| - const CellularNetwork* cellular =
|
| - NetworkLibrary::Get()->cellular_network();
|
| - if (cellular)
|
| - ConnectToNetwork(cellular->service_path());
|
| + const NetworkState* cellular =
|
| + NetworkHandler::Get()->network_state_handler()->
|
| + FirstNetworkByType(flimflam::kTypeCellular);
|
| + std::string service_path = cellular ? cellular->path() : "";
|
| + ShowNetworkSettings(service_path);
|
| +
|
| ash::Shell::GetInstance()->system_tray_notifier()->
|
| NotifyClearNetworkMessage(message_type);
|
| }
|
|
|