| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/policy/configuration_policy_handler.h" | 5 #include "chrome/browser/policy/configuration_policy_handler.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/file_path.h" | 9 #include "base/file_path.h" |
| 10 #include "base/json/json_writer.h" | 10 #include "base/json/json_writer.h" |
| (...skipping 1134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1145 default: | 1145 default: |
| 1146 errors->AddError(policy_name(), | 1146 errors->AddError(policy_name(), |
| 1147 IDS_POLICY_OUT_OF_RANGE_ERROR, | 1147 IDS_POLICY_OUT_OF_RANGE_ERROR, |
| 1148 base::IntToString(restore_value)); | 1148 base::IntToString(restore_value)); |
| 1149 } | 1149 } |
| 1150 } | 1150 } |
| 1151 } | 1151 } |
| 1152 return true; | 1152 return true; |
| 1153 } | 1153 } |
| 1154 | 1154 |
| 1155 // RestoreOnStartupURLsPolicyHandler implementation ---------------------------- |
| 1156 |
| 1157 RestoreOnStartupURLsPolicyHandler::RestoreOnStartupURLsPolicyHandler() |
| 1158 : TypeCheckingPolicyHandler(key::kRestoreOnStartupURLs, Value::TYPE_LIST) { |
| 1159 } |
| 1160 |
| 1161 RestoreOnStartupURLsPolicyHandler::~RestoreOnStartupURLsPolicyHandler() { |
| 1162 } |
| 1163 |
| 1164 void RestoreOnStartupURLsPolicyHandler::ApplyPolicySettings( |
| 1165 const PolicyMap& policies, |
| 1166 PrefValueMap* prefs) { |
| 1167 const Value* urls = policies.GetValue(key::kRestoreOnStartupURLs); |
| 1168 if (urls) { |
| 1169 prefs->SetValue(prefs::kURLsToRestoreOnStartup, urls->DeepCopy()); |
| 1170 prefs->SetValue(prefs::kSyncPromoShowOnFirstRunAllowed, |
| 1171 Value::CreateBooleanValue(false)); |
| 1172 } |
| 1173 } |
| 1174 |
| 1155 } // namespace policy | 1175 } // namespace policy |
| OLD | NEW |