| Index: chrome/browser/policy/configuration_policy_handler.cc
|
| diff --git a/chrome/browser/policy/configuration_policy_handler.cc b/chrome/browser/policy/configuration_policy_handler.cc
|
| index ec51386e2d7c9e9d3e0fc8f1b22f55b1d94a6b22..6d6203e94b3995199c253a2b31404eba092b963d 100644
|
| --- a/chrome/browser/policy/configuration_policy_handler.cc
|
| +++ b/chrome/browser/policy/configuration_policy_handler.cc
|
| @@ -997,28 +997,27 @@ bool RestoreOnStartupPolicyHandler::CheckPolicySettings(
|
| if (restore_policy->GetAsInteger(&restore_value) &&
|
| SessionStartupPref::PrefValueToType(restore_value) ==
|
| SessionStartupPref::LAST) {
|
| +
|
| const base::Value* cookies_policy =
|
| policies.GetValue(key::kCookiesSessionOnlyForUrls);
|
| - const base::Value* exit_policy =
|
| - policies.GetValue(key::kClearSiteDataOnExit);
|
| -
|
| const base::ListValue *cookies_value;
|
| - if (cookies_policy->GetAsList(&cookies_value) &&
|
| + if (cookies_policy && cookies_policy->GetAsList(&cookies_value) &&
|
| !cookies_value->empty()) {
|
| errors->AddError(key::kCookiesSessionOnlyForUrls,
|
| IDS_POLICY_OVERRIDDEN,
|
| key::kRestoreOnStartup);
|
| }
|
|
|
| + const base::Value* exit_policy =
|
| + policies.GetValue(key::kClearSiteDataOnExit);
|
| bool exit_value;
|
| - if (exit_policy->GetAsBoolean(&exit_value) && exit_value) {
|
| + if (exit_policy && exit_policy->GetAsBoolean(&exit_value) && exit_value) {
|
| errors->AddError(key::kClearSiteDataOnExit,
|
| IDS_POLICY_OVERRIDDEN,
|
| key::kRestoreOnStartup);
|
| }
|
| }
|
| }
|
| -
|
| return true;
|
| }
|
|
|
|
|