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

Unified Diff: chrome/browser/ui/webui/help/version_updater_chromeos.cc

Issue 2919683002: Treat tethered networks as mobile networks (Closed)
Patch Set: Created 3 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 | « no previous file | chrome/browser/ui/webui/settings/about_handler.cc » ('j') | chromeos/network/network_state.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/help/version_updater_chromeos.cc
diff --git a/chrome/browser/ui/webui/help/version_updater_chromeos.cc b/chrome/browser/ui/webui/help/version_updater_chromeos.cc
index e5885cee2ddc2834bdb786ddea0d100950d86e71..bd0e55f36b6e882d0239f20f06cbc004b34fd70b 100644
--- a/chrome/browser/ui/webui/help/version_updater_chromeos.cc
+++ b/chrome/browser/ui/webui/help/version_updater_chromeos.cc
@@ -55,7 +55,9 @@ NetworkStatus GetNetworkStatus(bool interactive,
if (network->type() == shill::kTypeBluetooth)
return NETWORK_STATUS_DISALLOWED;
- if (network->type() == shill::kTypeCellular &&
+ // Treats tethered networks as cellular networks.
+ if ((network->type() == shill::kTypeCellular ||
+ network->tethering_state() == shill::kTetheringConfirmedState) &&
!help_utils_chromeos::IsUpdateOverCellularAllowed(interactive)) {
return NETWORK_STATUS_DISALLOWED;
}
@@ -99,10 +101,12 @@ bool EnsureCanUpdate(bool interactive,
l10n_util::GetStringUTF16(IDS_UPGRADE_OFFLINE));
return false;
} else if (status == NETWORK_STATUS_DISALLOWED) {
- base::string16 message =
- l10n_util::GetStringFUTF16(
- IDS_UPGRADE_DISALLOWED,
- help_utils_chromeos::GetConnectionTypeAsUTF16(network->type()));
+ base::string16 message = l10n_util::GetStringFUTF16(
+ IDS_UPGRADE_DISALLOWED,
+ help_utils_chromeos::GetConnectionTypeAsUTF16(
+ network->tethering_state() == shill::kTetheringConfirmedState
+ ? shill::kTypeCellular
+ : network->type()));
callback.Run(VersionUpdater::FAILED_CONNECTION_TYPE_DISALLOWED, 0,
std::string(), 0, message);
return false;
« no previous file with comments | « no previous file | chrome/browser/ui/webui/settings/about_handler.cc » ('j') | chromeos/network/network_state.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698