| Index: chrome/browser/ui/webui/options/chromeos/internet_options_handler.cc
|
| diff --git a/chrome/browser/ui/webui/options/chromeos/internet_options_handler.cc b/chrome/browser/ui/webui/options/chromeos/internet_options_handler.cc
|
| index eb8fa9dec5ed9422a50843fd269e90ec7499d613..c4c8e95f2931efb44c9e65ae3dcc5b18710ae516 100644
|
| --- a/chrome/browser/ui/webui/options/chromeos/internet_options_handler.cc
|
| +++ b/chrome/browser/ui/webui/options/chromeos/internet_options_handler.cc
|
| @@ -1374,13 +1374,17 @@ void InternetOptionsHandler::PopulateDictionaryDetailsCallback(
|
| scoped_ptr<base::Value> auto_connect_value(
|
| new base::FundamentalValue(auto_connect));
|
| ::onc::ONCSource auto_connect_onc_source = onc_source;
|
| +
|
| + DCHECK_EQ(onc == NULL, onc_source == ::onc::ONC_SOURCE_NONE);
|
| bool auto_connect_recommended =
|
| auto_connect_onc_source != ::onc::ONC_SOURCE_NONE &&
|
| onc::IsRecommendedValue(onc, onc_path_to_auto_connect);
|
| - // |auto_connect_default_value| will contain either a recommended value
|
| - // if |auto_connect_recommended| is true, or an enforced value otherwise.
|
| + // If a policy exists, |auto_connect_default_value| will contain either a
|
| + // recommended value (if |auto_connect_recommended| is true) or an enforced
|
| + // value (if |auto_connect_recommended| is false).
|
| const base::Value* auto_connect_default_value = NULL;
|
| - onc->Get(onc_path_to_auto_connect, &auto_connect_default_value);
|
| + if (onc)
|
| + onc->Get(onc_path_to_auto_connect, &auto_connect_default_value);
|
|
|
| // Autoconnect can be controlled by the GlobalNetworkConfiguration of the
|
| // ONC policy.
|
|
|