| 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 d370f936df302572958a5bc204edef742af6df69..750244d4266045daba1c49a06cd19e35eb85a0d0 100644
|
| --- a/chrome/browser/ui/webui/help/help_utils_chromeos.cc
|
| +++ b/chrome/browser/ui/webui/help/help_utils_chromeos.cc
|
| @@ -12,28 +12,29 @@
|
| #include "base/values.h"
|
| #include "chrome/browser/chromeos/settings/cros_settings.h"
|
| #include "chrome/grit/generated_resources.h"
|
| +#include "chromeos/chromeos_switches.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"
|
| #include "ui/base/l10n/l10n_util.h"
|
|
|
| -namespace {
|
| -
|
| -const bool kDefaultUpdateOverCellularAllowed = false;
|
| -
|
| -} // namespace
|
| -
|
| namespace help_utils_chromeos {
|
|
|
| bool IsUpdateOverCellularAllowed() {
|
| + // If this is a Cellular First device, the default is to allow updates
|
| + // over cellular.
|
| + bool default_update_over_cellular_allowed =
|
| + chromeos::switches::IsCellularFirstDevice();
|
| +
|
| + // Device Policy overrides the defaults.
|
| chromeos::CrosSettings* settings = chromeos::CrosSettings::Get();
|
| if (!settings)
|
| - return kDefaultUpdateOverCellularAllowed;
|
| + return default_update_over_cellular_allowed;
|
|
|
| const base::Value* raw_types_value =
|
| settings->GetPref(chromeos::kAllowedConnectionTypesForUpdate);
|
| if (!raw_types_value)
|
| - return kDefaultUpdateOverCellularAllowed;
|
| + return default_update_over_cellular_allowed;
|
| const base::ListValue* types_value;
|
| CHECK(raw_types_value->GetAsList(&types_value));
|
| for (size_t i = 0; i < types_value->GetSize(); ++i) {
|
| @@ -45,7 +46,7 @@ bool IsUpdateOverCellularAllowed() {
|
| if (connection_type == 4)
|
| return true;
|
| }
|
| - return kDefaultUpdateOverCellularAllowed;
|
| + return default_update_over_cellular_allowed;
|
| }
|
|
|
| base::string16 GetConnectionTypeAsUTF16(const std::string& type) {
|
|
|