| 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 461 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 472 l10n_util::GetStringUTF8(IDS_OPTIONS_SETTINGS_SECTION_TITLE_DATETIME); | 472 l10n_util::GetStringUTF8(IDS_OPTIONS_SETTINGS_SECTION_TITLE_DATETIME); |
| 473 chrome::ShowSettingsSubPage(GetAppropriateBrowser(), sub_page); | 473 chrome::ShowSettingsSubPage(GetAppropriateBrowser(), sub_page); |
| 474 } | 474 } |
| 475 | 475 |
| 476 virtual void ShowNetworkSettings(const std::string& service_path) OVERRIDE { | 476 virtual void ShowNetworkSettings(const std::string& service_path) OVERRIDE { |
| 477 if (!LoginState::Get()->IsUserLoggedIn()) | 477 if (!LoginState::Get()->IsUserLoggedIn()) |
| 478 return; | 478 return; |
| 479 | 479 |
| 480 std::string page = chrome::kInternetOptionsSubPage; | 480 std::string page = chrome::kInternetOptionsSubPage; |
| 481 const chromeos::NetworkState* network = service_path.empty() ? NULL : | 481 const chromeos::NetworkState* network = service_path.empty() ? NULL : |
| 482 chromeos::NetworkStateHandler::Get()->GetNetworkState(service_path); | 482 NetworkHandler::Get()->network_state_handler()->GetNetworkState( |
| 483 service_path); |
| 483 if (network) { | 484 if (network) { |
| 484 std::string name(network->name()); | 485 std::string name(network->name()); |
| 485 if (name.empty() && network->type() == flimflam::kTypeEthernet) | 486 if (name.empty() && network->type() == flimflam::kTypeEthernet) |
| 486 name = l10n_util::GetStringUTF8(IDS_STATUSBAR_NETWORK_DEVICE_ETHERNET); | 487 name = l10n_util::GetStringUTF8(IDS_STATUSBAR_NETWORK_DEVICE_ETHERNET); |
| 487 page += base::StringPrintf( | 488 page += base::StringPrintf( |
| 488 "?servicePath=%s&networkType=%s&networkName=%s", | 489 "?servicePath=%s&networkType=%s&networkName=%s", |
| 489 net::EscapeUrlEncodedData(service_path, true).c_str(), | 490 net::EscapeUrlEncodedData(service_path, true).c_str(), |
| 490 net::EscapeUrlEncodedData(network->type(), true).c_str(), | 491 net::EscapeUrlEncodedData(network->type(), true).c_str(), |
| 491 net::EscapeUrlEncodedData(name, false).c_str()); | 492 net::EscapeUrlEncodedData(name, false).c_str()); |
| 492 } | 493 } |
| (...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 734 FindDriveIntegrationService(); | 735 FindDriveIntegrationService(); |
| 735 if (!integration_service) | 736 if (!integration_service) |
| 736 return; | 737 return; |
| 737 | 738 |
| 738 *list = ConvertToDriveStatusList( | 739 *list = ConvertToDriveStatusList( |
| 739 integration_service->job_list()->GetJobInfoList()); | 740 integration_service->job_list()->GetJobInfoList()); |
| 740 } | 741 } |
| 741 | 742 |
| 742 virtual void ConfigureNetwork(const std::string& network_id) OVERRIDE { | 743 virtual void ConfigureNetwork(const std::string& network_id) OVERRIDE { |
| 743 const chromeos::NetworkState* network = network_id.empty() ? NULL : | 744 const chromeos::NetworkState* network = network_id.empty() ? NULL : |
| 744 chromeos::NetworkStateHandler::Get()->GetNetworkState(network_id); | 745 NetworkHandler::Get()->network_state_handler()->GetNetworkState( |
| 746 network_id); |
| 745 if (!network) { | 747 if (!network) { |
| 746 LOG(ERROR) << "ConfigureNetwork: Network not found: " << network_id; | 748 LOG(ERROR) << "ConfigureNetwork: Network not found: " << network_id; |
| 747 return; | 749 return; |
| 748 } | 750 } |
| 749 if (network->type() == flimflam::kTypeWifi || | 751 if (network->type() == flimflam::kTypeWifi || |
| 750 network->type() == flimflam::kTypeWimax || | 752 network->type() == flimflam::kTypeWimax || |
| 751 network->type() == flimflam::kTypeVPN) { | 753 network->type() == flimflam::kTypeVPN) { |
| 752 // TODO(stevenjb): Replace with non-NetworkLibrary UI. | 754 // TODO(stevenjb): Replace with non-NetworkLibrary UI. |
| 753 Network* cros_network = CrosLibrary::Get()->GetNetworkLibrary()-> | 755 Network* cros_network = CrosLibrary::Get()->GetNetworkLibrary()-> |
| 754 FindNetworkByPath(network_id); | 756 FindNetworkByPath(network_id); |
| (...skipping 568 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1323 DISALLOW_COPY_AND_ASSIGN(SystemTrayDelegate); | 1325 DISALLOW_COPY_AND_ASSIGN(SystemTrayDelegate); |
| 1324 }; | 1326 }; |
| 1325 | 1327 |
| 1326 } // namespace | 1328 } // namespace |
| 1327 | 1329 |
| 1328 ash::SystemTrayDelegate* CreateSystemTrayDelegate() { | 1330 ash::SystemTrayDelegate* CreateSystemTrayDelegate() { |
| 1329 return new chromeos::SystemTrayDelegate(); | 1331 return new chromeos::SystemTrayDelegate(); |
| 1330 } | 1332 } |
| 1331 | 1333 |
| 1332 } // namespace chromeos | 1334 } // namespace chromeos |
| OLD | NEW |