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

Unified Diff: chrome/browser/ui/webui/options/chromeos/internet_options_handler.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/chromeos/status/network_menu.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/options/chromeos/internet_options_handler.cc
diff --git a/chrome/browser/ui/webui/options/chromeos/internet_options_handler.cc b/chrome/browser/ui/webui/options/chromeos/internet_options_handler.cc
index 6a867cc9bedf209996484f00a56bb67f1925a7e1..613105f77b87ccfa92c8e9c083c5dbb01e13da1b 100644
--- a/chrome/browser/ui/webui/options/chromeos/internet_options_handler.cc
+++ b/chrome/browser/ui/webui/options/chromeos/internet_options_handler.cc
@@ -551,15 +551,6 @@ void Activate(std::string service_path) {
cellular->StartActivation();
}
-// Check if the current cellular device can be activated by directly calling
-// it's activate function instead of going through the activation process.
-// Note: Currently Sprint is the only carrier that uses this.
-bool UseDirectActivation() {
- const chromeos::NetworkDevice* device =
- chromeos::CrosLibrary::Get()->GetNetworkLibrary()->FindCellularDevice();
- return device && (device->carrier() == shill::kCarrierSprint);
-}
-
// Given a list of supported carrier's by the device, return the index of
// the carrier the device is currently using.
int FindCurrentCarrierIndex(const base::ListValue* carriers,
@@ -977,7 +968,7 @@ void InternetOptionsHandler::CarrierStatusCallback(
chromeos::NetworkMethodErrorType error,
const std::string& error_message) {
if ((error == chromeos::NETWORK_METHOD_ERROR_NONE) &&
- UseDirectActivation()) {
+ cros_->CellularDeviceUsesDirectActivation()) {
Activate(service_path);
UpdateConnectionData(cros_->FindNetworkByPath(service_path));
}
@@ -1673,7 +1664,7 @@ void InternetOptionsHandler::NetworkCommandCallback(const ListValue* args) {
} else if (command == kTagDisconnect && type != chromeos::TYPE_ETHERNET) {
cros_->DisconnectFromNetwork(network);
} else if (command == kTagActivate && type == chromeos::TYPE_CELLULAR) {
- if (!UseDirectActivation()) {
+ if (!cros_->CellularDeviceUsesDirectActivation()) {
ash::Shell::GetInstance()->delegate()->OpenMobileSetup(
network->service_path());
} else {
« no previous file with comments | « chrome/browser/chromeos/status/network_menu.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698