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

Side by Side Diff: chrome/browser/chromeos/cros/network_library.cc

Issue 14753003: Don't open mobile setup when activating Sprint network from network menu (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 7 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/cros/network_library.h" 5 #include "chrome/browser/chromeos/cros/network_library.h"
6 6
7 #include "base/i18n/icu_encoding_detection.h" 7 #include "base/i18n/icu_encoding_detection.h"
8 #include "base/i18n/icu_string_conversions.h" 8 #include "base/i18n/icu_string_conversions.h"
9 #include "base/i18n/time_formatting.h" 9 #include "base/i18n/time_formatting.h"
10 #include "base/json/json_writer.h" // for debug output only. 10 #include "base/json/json_writer.h" // for debug output only.
(...skipping 894 matching lines...) Expand 10 before | Expand all | Expand 10 after
905 905
906 bool CellularNetwork::SupportsActivation() const { 906 bool CellularNetwork::SupportsActivation() const {
907 return !usage_url().empty() || !payment_url().empty(); 907 return !usage_url().empty() || !payment_url().empty();
908 } 908 }
909 909
910 bool CellularNetwork::NeedsActivation() const { 910 bool CellularNetwork::NeedsActivation() const {
911 return (activation_state() == ACTIVATION_STATE_NOT_ACTIVATED || 911 return (activation_state() == ACTIVATION_STATE_NOT_ACTIVATED ||
912 activation_state() == ACTIVATION_STATE_PARTIALLY_ACTIVATED); 912 activation_state() == ACTIVATION_STATE_PARTIALLY_ACTIVATED);
913 } 913 }
914 914
915 bool CellularNetwork::UsesDirectActivation() const {
tbarzic 2013/05/06 18:02:11 Ben, is this correct way to determine if the netwo
916 return operator_name_ == shill::kCarrierSprint;
tbarzic 2013/05/02 01:07:29 this should be the same as device->carrier() == sh
stevenjb 2013/05/03 22:19:34 I'm not certain, we should confirm this.
Ben Chan 2013/05/06 18:07:52 Should be checked against Device.Carrier as Servic
917 }
918
915 std::string CellularNetwork::GetNetworkTechnologyString() const { 919 std::string CellularNetwork::GetNetworkTechnologyString() const {
916 // No need to localize these cellular technology abbreviations. 920 // No need to localize these cellular technology abbreviations.
917 switch (network_technology_) { 921 switch (network_technology_) {
918 case NETWORK_TECHNOLOGY_1XRTT: 922 case NETWORK_TECHNOLOGY_1XRTT:
919 return "1xRTT"; 923 return "1xRTT";
920 break; 924 break;
921 case NETWORK_TECHNOLOGY_EVDO: 925 case NETWORK_TECHNOLOGY_EVDO:
922 return "EVDO"; 926 return "EVDO";
923 break; 927 break;
924 case NETWORK_TECHNOLOGY_GPRS: 928 case NETWORK_TECHNOLOGY_GPRS:
(...skipping 449 matching lines...) Expand 10 before | Expand all | Expand 10 after
1374 NetworkLibrary* impl; 1378 NetworkLibrary* impl;
1375 if (stub) 1379 if (stub)
1376 impl = new NetworkLibraryImplStub(); 1380 impl = new NetworkLibraryImplStub();
1377 else 1381 else
1378 impl = new NetworkLibraryImplCros(); 1382 impl = new NetworkLibraryImplCros();
1379 impl->Init(); 1383 impl->Init();
1380 return impl; 1384 return impl;
1381 } 1385 }
1382 1386
1383 } // namespace chromeos 1387 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/cros/network_library.h ('k') | chrome/browser/chromeos/status/network_menu.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698