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 | 8 |
9 #include "ash/ash_switches.h" | 9 #include "ash/ash_switches.h" |
10 #include "ash/shell.h" | 10 #include "ash/shell.h" |
(...skipping 728 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
739 crosnet->GetIPConfigsAndBlock(wifi->device_path(), wifi_mac_address, | 739 crosnet->GetIPConfigsAndBlock(wifi->device_path(), wifi_mac_address, |
740 NetworkLibrary::FORMAT_COLON_SEPARATED_HEX); | 740 NetworkLibrary::FORMAT_COLON_SEPARATED_HEX); |
741 } | 741 } |
742 | 742 |
743 virtual void ConnectToNetwork(const std::string& network_id) OVERRIDE { | 743 virtual void ConnectToNetwork(const std::string& network_id) OVERRIDE { |
744 NetworkLibrary* crosnet = CrosLibrary::Get()->GetNetworkLibrary(); | 744 NetworkLibrary* crosnet = CrosLibrary::Get()->GetNetworkLibrary(); |
745 Network* network = crosnet->FindNetworkByPath(network_id); | 745 Network* network = crosnet->FindNetworkByPath(network_id); |
746 if (CommandLine::ForCurrentProcess()->HasSwitch( | 746 if (CommandLine::ForCurrentProcess()->HasSwitch( |
747 ash::switches::kAshEnableNewNetworkStatusArea) && | 747 ash::switches::kAshEnableNewNetworkStatusArea) && |
748 CommandLine::ForCurrentProcess()->HasSwitch( | 748 CommandLine::ForCurrentProcess()->HasSwitch( |
749 chromeos::switches::kEnableNewNetworkConfigurationHandlers)) { | 749 chromeos::switches::kUseNewNetworkConfigurationHandlers)) { |
750 // If the new network handlers are enabled, this should always trigger | 750 // If the new network handlers are enabled, this should always trigger |
751 // displaying the network settings UI. | 751 // displaying the network settings UI. |
752 if (network) | 752 if (network) |
753 network_menu_->ShowTabbedNetworkSettings(network); | 753 network_menu_->ShowTabbedNetworkSettings(network); |
754 else | 754 else |
755 ShowNetworkSettings(); | 755 ShowNetworkSettings(); |
756 } else { | 756 } else { |
757 if (network) | 757 if (network) |
758 network_menu_->ConnectToNetwork(network); | 758 network_menu_->ConnectToNetwork(network); |
759 } | 759 } |
(...skipping 704 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1464 DISALLOW_COPY_AND_ASSIGN(SystemTrayDelegate); | 1464 DISALLOW_COPY_AND_ASSIGN(SystemTrayDelegate); |
1465 }; | 1465 }; |
1466 | 1466 |
1467 } // namespace | 1467 } // namespace |
1468 | 1468 |
1469 ash::SystemTrayDelegate* CreateSystemTrayDelegate() { | 1469 ash::SystemTrayDelegate* CreateSystemTrayDelegate() { |
1470 return new chromeos::SystemTrayDelegate(); | 1470 return new chromeos::SystemTrayDelegate(); |
1471 } | 1471 } |
1472 | 1472 |
1473 } // namespace chromeos | 1473 } // namespace chromeos |
OLD | NEW |