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

Unified Diff: chrome/browser/chromeos/user_cros_settings_provider.cc

Issue 7745018: Always enable roaming for cellular operators that don't work without it (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: tests fixed Created 9 years, 4 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/chromeos/user_cros_settings_provider.cc
diff --git a/chrome/browser/chromeos/user_cros_settings_provider.cc b/chrome/browser/chromeos/user_cros_settings_provider.cc
index 41437f237a9aa9a75f9d3057fd6dab645bef545e..c50e429895399c73c5e8519a08951ff99de3f5b3 100644
--- a/chrome/browser/chromeos/user_cros_settings_provider.cc
+++ b/chrome/browser/chromeos/user_cros_settings_provider.cc
@@ -308,6 +308,11 @@ class UserCrosSettingsTrust : public SignedSettingsHelper::Callback {
return;
NetworkLibrary* cros = CrosLibrary::Get()->GetNetworkLibrary();
+ if (cros->IsCellularAlwaysInRoaming()) {
+ // If operator requires roaming always enabled, ignore supplied value
+ // and set data roaming allowed in true always.
+ new_value = true;
+ }
cros->SetCellularDataRoamingAllowed(new_value);
} else if (path == kStatsReportingPref) {
// TODO(pastarmovj): Remove this once we don't need to regenerate the
@@ -328,9 +333,15 @@ class UserCrosSettingsTrust : public SignedSettingsHelper::Callback {
const NetworkDevice* cellular = cros->FindCellularDevice();
if (cellular) {
bool device_value = cellular->data_roaming_allowed();
- bool new_value = (use_value == USE_VALUE_SUPPLIED) ? value : false;
- if (device_value != new_value)
- cros->SetCellularDataRoamingAllowed(new_value);
+ if (!device_value && cros->IsCellularAlwaysInRoaming()) {
+ // If operator requires roaming always enabled, ignore supplied value
+ // and set data roaming allowed in true always.
+ cros->SetCellularDataRoamingAllowed(true);
+ } else {
+ bool new_value = (use_value == USE_VALUE_SUPPLIED) ? value : false;
+ if (device_value != new_value)
+ cros->SetCellularDataRoamingAllowed(new_value);
+ }
}
} else if (path == kStatsReportingPref) {
bool stats_consent = (use_value == USE_VALUE_SUPPLIED) ? value : false;

Powered by Google App Engine
This is Rietveld 408576698