Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(448)

Side by Side Diff: chrome/browser/chromeos/system/ash_system_tray_delegate.cc

Issue 12319145: Using the new Network*Handlers in networkingPrivate Extension API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed Steven's comments. Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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::kAshEnableNewNetworkStatusArea) && 747 ash::switches::kAshEnableNewNetworkStatusArea)) {
stevenjb 2013/03/05 17:59:18 Please use the new flag here; it needs to match th
pneubeck (no reviews) 2013/03/07 15:53:02 Done.
748 CommandLine::ForCurrentProcess()->HasSwitch(
749 chromeos::switches::kEnableNewNetworkConfigurationHandlers)) {
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 707 matching lines...) Expand 10 before | Expand all | Expand 10 after
1467 DISALLOW_COPY_AND_ASSIGN(SystemTrayDelegate); 1465 DISALLOW_COPY_AND_ASSIGN(SystemTrayDelegate);
1468 }; 1466 };
1469 1467
1470 } // namespace 1468 } // namespace
1471 1469
1472 ash::SystemTrayDelegate* CreateSystemTrayDelegate() { 1470 ash::SystemTrayDelegate* CreateSystemTrayDelegate() {
1473 return new chromeos::SystemTrayDelegate(); 1471 return new chromeos::SystemTrayDelegate();
1474 } 1472 }
1475 1473
1476 } // namespace chromeos 1474 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698