| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "chrome/browser/chromeos/status/network_menu.h" | 5 #include "chrome/browser/chromeos/status/network_menu.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "ash/shell.h" | 9 #include "ash/shell.h" |
| 10 #include "ash/shell_delegate.h" | 10 #include "ash/shell_delegate.h" |
| (...skipping 920 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 931 return; | 931 return; |
| 932 | 932 |
| 933 DCHECK(network); | 933 DCHECK(network); |
| 934 Browser* browser = GetAppropriateBrowser(); | 934 Browser* browser = GetAppropriateBrowser(); |
| 935 | 935 |
| 936 std::string network_name(network->name()); | 936 std::string network_name(network->name()); |
| 937 if (network_name.empty() && network->type() == chromeos::TYPE_ETHERNET) { | 937 if (network_name.empty() && network->type() == chromeos::TYPE_ETHERNET) { |
| 938 network_name = l10n_util::GetStringUTF8( | 938 network_name = l10n_util::GetStringUTF8( |
| 939 IDS_STATUSBAR_NETWORK_DEVICE_ETHERNET); | 939 IDS_STATUSBAR_NETWORK_DEVICE_ETHERNET); |
| 940 } | 940 } |
| 941 std::string page = StringPrintf( | 941 std::string page = base::StringPrintf( |
| 942 "%s?servicePath=%s&networkType=%d&networkName=%s", | 942 "%s?servicePath=%s&networkType=%d&networkName=%s", |
| 943 chrome::kInternetOptionsSubPage, | 943 chrome::kInternetOptionsSubPage, |
| 944 net::EscapeUrlEncodedData(network->service_path(), true).c_str(), | 944 net::EscapeUrlEncodedData(network->service_path(), true).c_str(), |
| 945 network->type(), | 945 network->type(), |
| 946 net::EscapeUrlEncodedData(network_name, false).c_str()); | 946 net::EscapeUrlEncodedData(network_name, false).c_str()); |
| 947 chrome::ShowSettingsSubPage(browser, page); | 947 chrome::ShowSettingsSubPage(browser, page); |
| 948 } | 948 } |
| 949 | 949 |
| 950 void NetworkMenu::DoConnect(Network* network) { | 950 void NetworkMenu::DoConnect(Network* network) { |
| 951 NetworkLibrary* cros = CrosLibrary::Get()->GetNetworkLibrary(); | 951 NetworkLibrary* cros = CrosLibrary::Get()->GetNetworkLibrary(); |
| (...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1105 | 1105 |
| 1106 void NetworkMenu::ShowOtherVPN() { | 1106 void NetworkMenu::ShowOtherVPN() { |
| 1107 NetworkConfigView::ShowForType(TYPE_VPN, delegate_->GetNativeWindow()); | 1107 NetworkConfigView::ShowForType(TYPE_VPN, delegate_->GetNativeWindow()); |
| 1108 } | 1108 } |
| 1109 | 1109 |
| 1110 void NetworkMenu::ShowOtherCellular() { | 1110 void NetworkMenu::ShowOtherCellular() { |
| 1111 ChooseMobileNetworkDialog::ShowDialog(delegate_->GetNativeWindow()); | 1111 ChooseMobileNetworkDialog::ShowDialog(delegate_->GetNativeWindow()); |
| 1112 } | 1112 } |
| 1113 | 1113 |
| 1114 } // namespace chromeos | 1114 } // namespace chromeos |
| OLD | NEW |