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

Side by Side Diff: chrome/browser/chromeos/status/network_menu.cc

Issue 6292008: Added flags to prevent messing with network connections while 3G device is be... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 11 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/status/network_menu.h" 5 #include "chrome/browser/chromeos/status/network_menu.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "app/l10n_util.h" 9 #include "app/l10n_util.h"
10 #include "app/resource_bundle.h" 10 #include "app/resource_bundle.h"
(...skipping 465 matching lines...) Expand 10 before | Expand all | Expand 10 after
476 // This gets called on initialization, so any changes should be reflected 476 // This gets called on initialization, so any changes should be reflected
477 // in CrosMock::SetNetworkLibraryStatusAreaExpectations(). 477 // in CrosMock::SetNetworkLibraryStatusAreaExpectations().
478 478
479 menu_items_.clear(); 479 menu_items_.clear();
480 // Populate our MenuItems with the current list of wifi networks. 480 // Populate our MenuItems with the current list of wifi networks.
481 NetworkLibrary* cros = CrosLibrary::Get()->GetNetworkLibrary(); 481 NetworkLibrary* cros = CrosLibrary::Get()->GetNetworkLibrary();
482 ResourceBundle& rb = ResourceBundle::GetSharedInstance(); 482 ResourceBundle& rb = ResourceBundle::GetSharedInstance();
483 483
484 string16 label; 484 string16 label;
485 485
486 if (cros->IsLocked()) {
487 label = l10n_util::GetStringUTF16(IDS_STATUSBAR_NETWORK_LOCKED);
488 menu_items_.push_back(
489 MenuItem(ui::MenuModel::TYPE_COMMAND,
490 label, SkBitmap(),
491 std::string(), FLAG_DISABLED));
492 return;
493 }
494
486 // Ethernet 495 // Ethernet
487 bool ethernet_available = cros->ethernet_available(); 496 bool ethernet_available = cros->ethernet_available();
488 bool ethernet_enabled = cros->ethernet_enabled(); 497 bool ethernet_enabled = cros->ethernet_enabled();
489 if (ethernet_available && ethernet_enabled) { 498 if (ethernet_available && ethernet_enabled) {
490 bool ethernet_connected = cros->ethernet_connected(); 499 bool ethernet_connected = cros->ethernet_connected();
491 bool ethernet_connecting = cros->ethernet_connecting(); 500 bool ethernet_connecting = cros->ethernet_connecting();
492 501
493 if (ethernet_connecting) { 502 if (ethernet_connecting) {
494 label = l10n_util::GetStringFUTF16( 503 label = l10n_util::GetStringFUTF16(
495 IDS_STATUSBAR_NETWORK_DEVICE_STATUS, 504 IDS_STATUSBAR_NETWORK_DEVICE_STATUS,
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after
749 chrome::kInternetOptionsSubPage, 758 chrome::kInternetOptionsSubPage,
750 chromeos::TYPE_WIFI); 759 chromeos::TYPE_WIFI);
751 browser->ShowOptionsTab(page); 760 browser->ShowOptionsTab(page);
752 } 761 }
753 } else { 762 } else {
754 ShowNetworkConfigView(new NetworkConfigView()); 763 ShowNetworkConfigView(new NetworkConfigView());
755 } 764 }
756 } 765 }
757 766
758 } // namespace chromeos 767 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/dom_ui/mobile_setup_ui.cc ('k') | chrome/browser/resources/options/chromeos_internet_options.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698