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

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

Issue 4733001: Fix so that we don't show activate 3G in both OOBE and login screen.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 10 years, 1 month 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 548 matching lines...) Expand 10 before | Expand all | Expand 10 after
559 if (cellular_available) { 559 if (cellular_available) {
560 const CellularNetworkVector& cell_networks = cros->cellular_networks(); 560 const CellularNetworkVector& cell_networks = cros->cellular_networks();
561 const CellularNetwork* active_cellular = cros->cellular_network(); 561 const CellularNetwork* active_cellular = cros->cellular_network();
562 562
563 bool separator_added = false; 563 bool separator_added = false;
564 // List Cellular networks. 564 // List Cellular networks.
565 for (size_t i = 0; i < cell_networks.size(); ++i) { 565 for (size_t i = 0; i < cell_networks.size(); ++i) {
566 chromeos::ActivationState activation_state = 566 chromeos::ActivationState activation_state =
567 cell_networks[i]->activation_state(); 567 cell_networks[i]->activation_state();
568 if (activation_state == ACTIVATION_STATE_NOT_ACTIVATED) { 568 if (activation_state == ACTIVATION_STATE_NOT_ACTIVATED) {
569 // If we are on the login screen, do not show activating 3G option. 569 // If we are on the OOBE/login screen, do not show activating 3G option.
570 // TODO(chocobo): We are currently using ShouldOpenButtonOptions() to 570 if (!IsBrowserMode())
571 // tell whether or not we are at the login screen. We need to fix it.
572 if (!ShouldOpenButtonOptions())
573 continue; 571 continue;
574 label = l10n_util::GetStringFUTF16( 572 label = l10n_util::GetStringFUTF16(
575 IDS_STATUSBAR_NETWORK_DEVICE_ACTIVATE, 573 IDS_STATUSBAR_NETWORK_DEVICE_ACTIVATE,
576 ASCIIToUTF16(cell_networks[i]->name())); 574 ASCIIToUTF16(cell_networks[i]->name()));
577 } else if (activation_state == ACTIVATION_STATE_PARTIALLY_ACTIVATED || 575 } else if (activation_state == ACTIVATION_STATE_PARTIALLY_ACTIVATED ||
578 activation_state == ACTIVATION_STATE_ACTIVATING) { 576 activation_state == ACTIVATION_STATE_ACTIVATING) {
579 label = l10n_util::GetStringFUTF16( 577 label = l10n_util::GetStringFUTF16(
580 IDS_STATUSBAR_NETWORK_DEVICE_STATUS, 578 IDS_STATUSBAR_NETWORK_DEVICE_STATUS,
581 ASCIIToUTF16(cell_networks[i]->name()), 579 ASCIIToUTF16(cell_networks[i]->name()),
582 l10n_util::GetStringUTF16(IDS_STATUSBAR_NETWORK_DEVICE_ACTIVATING)); 580 l10n_util::GetStringUTF16(IDS_STATUSBAR_NETWORK_DEVICE_ACTIVATING));
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
770 chromeos::TYPE_WIFI); 768 chromeos::TYPE_WIFI);
771 browser->ShowOptionsTab(page); 769 browser->ShowOptionsTab(page);
772 } 770 }
773 } else { 771 } else {
774 const bool kFocusLogin = true; 772 const bool kFocusLogin = true;
775 ShowNetworkConfigView(new NetworkConfigView(), kFocusLogin); 773 ShowNetworkConfigView(new NetworkConfigView(), kFocusLogin);
776 } 774 }
777 } 775 }
778 776
779 } // namespace chromeos 777 } // namespace chromeos
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698