Chromium Code Reviews| 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..49c565573c220b994eb7e23b13ecd50b32f29587 100644 |
| --- a/chrome/browser/ui/webui/options/chromeos/internet_options_handler.cc |
| +++ b/chrome/browser/ui/webui/options/chromeos/internet_options_handler.cc |
| @@ -1376,11 +1376,13 @@ void InternetOptionsHandler::PopulateDictionaryDetailsCallback( |
| ::onc::ONCSource auto_connect_onc_source = onc_source; |
| 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. |
| + onc && onc::IsRecommendedValue(onc, onc_path_to_auto_connect); |
|
pneubeck (no reviews)
2014/08/13 02:37:14
optional nit:
strictly, this 'onc' condition shoul
michaelpg
2014/08/13 02:59:03
Done.
|
| + // 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. |