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 468 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
479 l10n_util::GetStringUTF8(IDS_OPTIONS_SETTINGS_SECTION_TITLE_DATETIME); | 479 l10n_util::GetStringUTF8(IDS_OPTIONS_SETTINGS_SECTION_TITLE_DATETIME); |
480 chrome::ShowSettingsSubPage(GetAppropriateBrowser(), sub_page); | 480 chrome::ShowSettingsSubPage(GetAppropriateBrowser(), sub_page); |
481 } | 481 } |
482 | 482 |
483 virtual void ShowNetworkSettings(const std::string& service_path) OVERRIDE { | 483 virtual void ShowNetworkSettings(const std::string& service_path) OVERRIDE { |
484 if (!LoginState::Get()->IsUserLoggedIn()) | 484 if (!LoginState::Get()->IsUserLoggedIn()) |
485 return; | 485 return; |
486 | 486 |
487 std::string page = chrome::kInternetOptionsSubPage; | 487 std::string page = chrome::kInternetOptionsSubPage; |
488 const chromeos::NetworkState* network = service_path.empty() ? NULL : | 488 const chromeos::NetworkState* network = service_path.empty() ? NULL : |
489 chromeos::NetworkStateHandler::Get()->GetNetworkState(service_path); | 489 NetworkHandler::Get()->network_state_handler()->GetNetworkState( |
| 490 service_path); |
490 if (network) { | 491 if (network) { |
491 std::string name(network->name()); | 492 std::string name(network->name()); |
492 if (name.empty() && network->type() == flimflam::kTypeEthernet) | 493 if (name.empty() && network->type() == flimflam::kTypeEthernet) |
493 name = l10n_util::GetStringUTF8(IDS_STATUSBAR_NETWORK_DEVICE_ETHERNET); | 494 name = l10n_util::GetStringUTF8(IDS_STATUSBAR_NETWORK_DEVICE_ETHERNET); |
494 page += base::StringPrintf( | 495 page += base::StringPrintf( |
495 "?servicePath=%s&networkType=%s&networkName=%s", | 496 "?servicePath=%s&networkType=%s&networkName=%s", |
496 net::EscapeUrlEncodedData(service_path, true).c_str(), | 497 net::EscapeUrlEncodedData(service_path, true).c_str(), |
497 net::EscapeUrlEncodedData(network->type(), true).c_str(), | 498 net::EscapeUrlEncodedData(network->type(), true).c_str(), |
498 net::EscapeUrlEncodedData(name, false).c_str()); | 499 net::EscapeUrlEncodedData(name, false).c_str()); |
499 } | 500 } |
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
740 FindDriveIntegrationService(); | 741 FindDriveIntegrationService(); |
741 if (!integration_service) | 742 if (!integration_service) |
742 return; | 743 return; |
743 | 744 |
744 *list = ConvertToDriveStatusList( | 745 *list = ConvertToDriveStatusList( |
745 integration_service->job_list()->GetJobInfoList()); | 746 integration_service->job_list()->GetJobInfoList()); |
746 } | 747 } |
747 | 748 |
748 virtual void ConfigureNetwork(const std::string& network_id) OVERRIDE { | 749 virtual void ConfigureNetwork(const std::string& network_id) OVERRIDE { |
749 const chromeos::NetworkState* network = network_id.empty() ? NULL : | 750 const chromeos::NetworkState* network = network_id.empty() ? NULL : |
750 chromeos::NetworkStateHandler::Get()->GetNetworkState(network_id); | 751 NetworkHandler::Get()->network_state_handler()->GetNetworkState( |
| 752 network_id); |
751 if (!network) { | 753 if (!network) { |
752 LOG(ERROR) << "ConfigureNetwork: Network not found: " << network_id; | 754 LOG(ERROR) << "ConfigureNetwork: Network not found: " << network_id; |
753 return; | 755 return; |
754 } | 756 } |
755 if (network->type() == flimflam::kTypeWifi || | 757 if (network->type() == flimflam::kTypeWifi || |
756 network->type() == flimflam::kTypeWimax || | 758 network->type() == flimflam::kTypeWimax || |
757 network->type() == flimflam::kTypeVPN) { | 759 network->type() == flimflam::kTypeVPN) { |
758 // TODO(stevenjb): Replace with non-NetworkLibrary UI. | 760 // TODO(stevenjb): Replace with non-NetworkLibrary UI. |
759 Network* cros_network = CrosLibrary::Get()->GetNetworkLibrary()-> | 761 Network* cros_network = CrosLibrary::Get()->GetNetworkLibrary()-> |
760 FindNetworkByPath(network_id); | 762 FindNetworkByPath(network_id); |
(...skipping 576 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1337 DISALLOW_COPY_AND_ASSIGN(SystemTrayDelegate); | 1339 DISALLOW_COPY_AND_ASSIGN(SystemTrayDelegate); |
1338 }; | 1340 }; |
1339 | 1341 |
1340 } // namespace | 1342 } // namespace |
1341 | 1343 |
1342 ash::SystemTrayDelegate* CreateSystemTrayDelegate() { | 1344 ash::SystemTrayDelegate* CreateSystemTrayDelegate() { |
1343 return new chromeos::SystemTrayDelegate(); | 1345 return new chromeos::SystemTrayDelegate(); |
1344 } | 1346 } |
1345 | 1347 |
1346 } // namespace chromeos | 1348 } // namespace chromeos |
OLD | NEW |