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

Unified Diff: chrome/browser/chromeos/cros/network_library_impl_cros.cc

Issue 10854112: Fix always-in-roaming reset loop for cellular connections on Chromium OS. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments Created 8 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/cros/network_library_impl_cros.cc
diff --git a/chrome/browser/chromeos/cros/network_library_impl_cros.cc b/chrome/browser/chromeos/cros/network_library_impl_cros.cc
index 21b12a53f052abba6c5d32e0d5012c8614f42761..e0c30ec126125a7271162fb6529afcb75e6c23f4 100644
--- a/chrome/browser/chromeos/cros/network_library_impl_cros.cc
+++ b/chrome/browser/chromeos/cros/network_library_impl_cros.cc
@@ -25,7 +25,8 @@ namespace {
// List of cellular operators names that should have data roaming always enabled
// to be able to connect to any network.
const char* kAlwaysInRoamingOperators[] = {
- "CUBIC"
+ "CUBIC",
+ "Cubic",
};
// List of interfaces that have portal check enabled by default.
@@ -161,11 +162,12 @@ void NetworkLibraryImplCros::UpdateNetworkDeviceStatus(
}
}
-bool NetworkLibraryImplCros::UpdateCellularDeviceStatus(
- NetworkDevice* device, PropertyIndex index) {
+bool NetworkLibraryImplCros::UpdateCellularDeviceStatus(NetworkDevice* device,
+ PropertyIndex index) {
if (index == PROPERTY_INDEX_CELLULAR_ALLOW_ROAMING) {
- if (!device->data_roaming_allowed() && IsCellularAlwaysInRoaming()) {
- SetCellularDataRoamingAllowed(true);
+ if (IsCellularAlwaysInRoaming()) {
+ if (!device->data_roaming_allowed())
+ SetCellularDataRoamingAllowed(true);
} else {
bool settings_value;
if ((CrosSettings::Get()->GetBoolean(
@@ -1175,19 +1177,11 @@ void NetworkLibraryImplCros::ParseNetworkDevice(const std::string& device_path,
CHECK(device) << "Attempted to add NULL device for path: " << device_path;
}
VLOG(2) << "ParseNetworkDevice:" << device->name();
- if (device && device->type() == TYPE_CELLULAR) {
- if (!device->data_roaming_allowed() && IsCellularAlwaysInRoaming()) {
- SetCellularDataRoamingAllowed(true);
- } else {
- bool settings_value;
- if (CrosSettings::Get()->GetBoolean(
- kSignedDataRoamingEnabled, &settings_value) &&
- device->data_roaming_allowed() != settings_value) {
- // Switch back to signed settings value.
- SetCellularDataRoamingAllowed(settings_value);
- }
- }
- }
+
+ // Re-synchronize the roaming setting with the device property if required.
+ if (device && device->type() == TYPE_CELLULAR)
+ UpdateCellularDeviceStatus(device, PROPERTY_INDEX_CELLULAR_ALLOW_ROAMING);
+
NotifyNetworkManagerChanged(false); // Not forced.
AddNetworkDeviceObserver(device_path, network_device_observer_.get());
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698