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/system/ash_system_tray_delegate.h" | 5 #include "chrome/browser/chromeos/system/ash_system_tray_delegate.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <set> | 8 #include <set> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
220 // TODO(sad): Do something? | 220 // TODO(sad): Do something? |
221 } | 221 } |
222 | 222 |
223 void ShowNetworkSettingsPage(const std::string& service_path) { | 223 void ShowNetworkSettingsPage(const std::string& service_path) { |
224 std::string page = chrome::kInternetOptionsSubPage; | 224 std::string page = chrome::kInternetOptionsSubPage; |
225 const NetworkState* network = service_path.empty() ? NULL : | 225 const NetworkState* network = service_path.empty() ? NULL : |
226 NetworkHandler::Get()->network_state_handler()->GetNetworkState( | 226 NetworkHandler::Get()->network_state_handler()->GetNetworkState( |
227 service_path); | 227 service_path); |
228 if (network) { | 228 if (network) { |
229 std::string name(network->name()); | 229 std::string name(network->name()); |
230 if (name.empty() && network->type() == flimflam::kTypeEthernet) | 230 if (name.empty() && network->IsTypeEthernet()) |
231 name = l10n_util::GetStringUTF8(IDS_STATUSBAR_NETWORK_DEVICE_ETHERNET); | 231 name = l10n_util::GetStringUTF8(IDS_STATUSBAR_NETWORK_DEVICE_ETHERNET); |
232 page += base::StringPrintf( | 232 page += base::StringPrintf( |
233 "?servicePath=%s&networkType=%s&networkName=%s", | 233 "?servicePath=%s&networkType=%s&networkName=%s", |
234 net::EscapeUrlEncodedData(service_path, true).c_str(), | 234 net::EscapeUrlEncodedData(service_path, true).c_str(), |
235 net::EscapeUrlEncodedData(network->type(), true).c_str(), | 235 net::EscapeUrlEncodedData(network->type(), true).c_str(), |
236 net::EscapeUrlEncodedData(name, false).c_str()); | 236 net::EscapeUrlEncodedData(name, false).c_str()); |
237 } | 237 } |
238 content::RecordAction( | 238 content::RecordAction( |
239 content::UserMetricsAction("OpenInternetOptionsDialog")); | 239 content::UserMetricsAction("OpenInternetOptionsDialog")); |
240 Browser* browser = chrome::FindOrCreateTabbedBrowser( | 240 Browser* browser = chrome::FindOrCreateTabbedBrowser( |
(...skipping 1083 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1324 DISALLOW_COPY_AND_ASSIGN(SystemTrayDelegate); | 1324 DISALLOW_COPY_AND_ASSIGN(SystemTrayDelegate); |
1325 }; | 1325 }; |
1326 | 1326 |
1327 } // namespace | 1327 } // namespace |
1328 | 1328 |
1329 ash::SystemTrayDelegate* CreateSystemTrayDelegate() { | 1329 ash::SystemTrayDelegate* CreateSystemTrayDelegate() { |
1330 return new chromeos::SystemTrayDelegate(); | 1330 return new chromeos::SystemTrayDelegate(); |
1331 } | 1331 } |
1332 | 1332 |
1333 } // namespace chromeos | 1333 } // namespace chromeos |
OLD | NEW |