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

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

Issue 4702003: Merge 65476 - Fix so that we don't show activate 3G in both OOBE and login sc... (Closed) Base URL: svn://svn.chromium.org/chrome/branches/552/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 532 matching lines...) Expand 10 before | Expand all | Expand 10 after
543 if (cellular_available) { 543 if (cellular_available) {
544 const CellularNetworkVector& cell_networks = cros->cellular_networks(); 544 const CellularNetworkVector& cell_networks = cros->cellular_networks();
545 const CellularNetwork* active_cellular = cros->cellular_network(); 545 const CellularNetwork* active_cellular = cros->cellular_network();
546 546
547 bool separator_added = false; 547 bool separator_added = false;
548 // List Cellular networks. 548 // List Cellular networks.
549 for (size_t i = 0; i < cell_networks.size(); ++i) { 549 for (size_t i = 0; i < cell_networks.size(); ++i) {
550 chromeos::ActivationState activation_state = 550 chromeos::ActivationState activation_state =
551 cell_networks[i]->activation_state(); 551 cell_networks[i]->activation_state();
552 if (activation_state == ACTIVATION_STATE_NOT_ACTIVATED) { 552 if (activation_state == ACTIVATION_STATE_NOT_ACTIVATED) {
553 // If we are on the login screen, do not show activating 3G option. 553 // If we are on the OOBE/login screen, do not show activating 3G option.
554 // TODO(chocobo): We are currently using ShouldOpenButtonOptions() to 554 if (!IsBrowserMode())
555 // tell whether or not we are at the login screen. We need to fix it.
556 if (!ShouldOpenButtonOptions())
557 continue; 555 continue;
558 label = l10n_util::GetStringFUTF16( 556 label = l10n_util::GetStringFUTF16(
559 IDS_STATUSBAR_NETWORK_DEVICE_ACTIVATE, 557 IDS_STATUSBAR_NETWORK_DEVICE_ACTIVATE,
560 ASCIIToUTF16(cell_networks[i]->name())); 558 ASCIIToUTF16(cell_networks[i]->name()));
561 } else if (activation_state == ACTIVATION_STATE_PARTIALLY_ACTIVATED || 559 } else if (activation_state == ACTIVATION_STATE_PARTIALLY_ACTIVATED ||
562 activation_state == ACTIVATION_STATE_ACTIVATING) { 560 activation_state == ACTIVATION_STATE_ACTIVATING) {
563 label = l10n_util::GetStringFUTF16( 561 label = l10n_util::GetStringFUTF16(
564 IDS_STATUSBAR_NETWORK_DEVICE_STATUS, 562 IDS_STATUSBAR_NETWORK_DEVICE_STATUS,
565 ASCIIToUTF16(cell_networks[i]->name()), 563 ASCIIToUTF16(cell_networks[i]->name()),
566 l10n_util::GetStringUTF16(IDS_STATUSBAR_NETWORK_DEVICE_ACTIVATING)); 564 l10n_util::GetStringUTF16(IDS_STATUSBAR_NETWORK_DEVICE_ACTIVATING));
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
736 chromeos::TYPE_WIFI); 734 chromeos::TYPE_WIFI);
737 browser->ShowOptionsTab(page); 735 browser->ShowOptionsTab(page);
738 } 736 }
739 } else { 737 } else {
740 const bool kFocusLogin = true; 738 const bool kFocusLogin = true;
741 ShowNetworkConfigView(new NetworkConfigView(), kFocusLogin); 739 ShowNetworkConfigView(new NetworkConfigView(), kFocusLogin);
742 } 740 }
743 } 741 }
744 742
745 } // namespace chromeos 743 } // 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