| 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 726 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 737 crosnet->FindWifiDevice() : NULL; | 737 crosnet->FindWifiDevice() : NULL; |
| 738 if (wifi) | 738 if (wifi) |
| 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::kAshDisableNewNetworkStatusArea) && | 747 ash::switches::kAshDisableNewNetworkStatusArea)) { |
| 748 CommandLine::ForCurrentProcess()->HasSwitch( | |
| 749 chromeos::switches::kUseNewNetworkConfigurationHandlers)) { | |
| 750 // If the new network handlers are enabled, this should always trigger | 748 // If the new network handlers are enabled, this should always trigger |
| 751 // displaying the network settings UI. | 749 // displaying the network settings UI. |
| 752 if (network) | 750 if (network) |
| 753 network_menu_->ShowTabbedNetworkSettings(network); | 751 network_menu_->ShowTabbedNetworkSettings(network); |
| 754 else | 752 else |
| 755 ShowNetworkSettings(); | 753 ShowNetworkSettings(); |
| 756 } else { | 754 } else { |
| 757 if (network) | 755 if (network) |
| 758 network_menu_->ConnectToNetwork(network); | 756 network_menu_->ConnectToNetwork(network); |
| 759 } | 757 } |
| (...skipping 704 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1464 DISALLOW_COPY_AND_ASSIGN(SystemTrayDelegate); | 1462 DISALLOW_COPY_AND_ASSIGN(SystemTrayDelegate); |
| 1465 }; | 1463 }; |
| 1466 | 1464 |
| 1467 } // namespace | 1465 } // namespace |
| 1468 | 1466 |
| 1469 ash::SystemTrayDelegate* CreateSystemTrayDelegate() { | 1467 ash::SystemTrayDelegate* CreateSystemTrayDelegate() { |
| 1470 return new chromeos::SystemTrayDelegate(); | 1468 return new chromeos::SystemTrayDelegate(); |
| 1471 } | 1469 } |
| 1472 | 1470 |
| 1473 } // namespace chromeos | 1471 } // namespace chromeos |
| OLD | NEW |