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

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

Issue 2919683002: Treat tethered networks as mobile networks (Closed)
Patch Set: Clean up code 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
Index: chrome/browser/ui/webui/help/help_utils_chromeos.cc
diff --git a/chrome/browser/ui/webui/help/help_utils_chromeos.cc b/chrome/browser/ui/webui/help/help_utils_chromeos.cc
index 1420ac5e6160ac43486ec0ae09e5e64c036b2d7b..ea4884ec15fd5d3f44de5345f329a825c5334d5f 100644
--- a/chrome/browser/ui/webui/help/help_utils_chromeos.cc
+++ b/chrome/browser/ui/webui/help/help_utils_chromeos.cc
@@ -13,6 +13,7 @@
#include "chrome/browser/chromeos/settings/cros_settings.h"
#include "chrome/grit/generated_resources.h"
#include "chromeos/chromeos_switches.h"
+#include "chromeos/network/network_state.h"
#include "chromeos/network/network_type_pattern.h"
#include "chromeos/settings/cros_settings_names.h"
#include "third_party/cros_system_api/dbus/service_constants.h"
@@ -51,7 +52,9 @@ bool IsUpdateOverCellularAllowed(bool interactive) {
return false;
}
-base::string16 GetConnectionTypeAsUTF16(const std::string& type) {
+base::string16 GetConnectionTypeAsUTF16(const chromeos::NetworkState* network) {
+ const std::string type =
+ network->IsUsingMobileData() ? shill::kTypeCellular : network->type();
if (chromeos::NetworkTypePattern::Ethernet().MatchesType(type))
return l10n_util::GetStringUTF16(IDS_NETWORK_TYPE_ETHERNET);
if (type == shill::kTypeWifi)
« no previous file with comments | « chrome/browser/ui/webui/help/help_utils_chromeos.h ('k') | chrome/browser/ui/webui/help/version_updater_chromeos.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698