| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_pref_store.h" | 5 #include "chrome/browser/policy/configuration_policy_pref_store.h" |
| 6 | 6 |
| 7 #include <map> | 7 #include <map> |
| 8 #include <set> | 8 #include <set> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 267 { Value::TYPE_BOOLEAN, kPolicyTranslateEnabled, prefs::kEnableTranslate }, | 267 { Value::TYPE_BOOLEAN, kPolicyTranslateEnabled, prefs::kEnableTranslate }, |
| 268 { Value::TYPE_BOOLEAN, kPolicyBookmarkBarEnabled, prefs::kEnableBookmarkBar }, | 268 { Value::TYPE_BOOLEAN, kPolicyBookmarkBarEnabled, prefs::kEnableBookmarkBar }, |
| 269 { Value::TYPE_BOOLEAN, kPolicyAllowOutdatedPlugins, | 269 { Value::TYPE_BOOLEAN, kPolicyAllowOutdatedPlugins, |
| 270 prefs::kPluginsAllowOutdated }, | 270 prefs::kPluginsAllowOutdated }, |
| 271 { Value::TYPE_BOOLEAN, kPolicyAlwaysAuthorizePlugins, | 271 { Value::TYPE_BOOLEAN, kPolicyAlwaysAuthorizePlugins, |
| 272 prefs::kPluginsAlwaysAuthorize }, | 272 prefs::kPluginsAlwaysAuthorize }, |
| 273 { Value::TYPE_BOOLEAN, kPolicyEditBookmarksEnabled, | 273 { Value::TYPE_BOOLEAN, kPolicyEditBookmarksEnabled, |
| 274 prefs::kEditBookmarksEnabled }, | 274 prefs::kEditBookmarksEnabled }, |
| 275 { Value::TYPE_BOOLEAN, kPolicyAllowFileSelectionDialogs, | 275 { Value::TYPE_BOOLEAN, kPolicyAllowFileSelectionDialogs, |
| 276 prefs::kAllowFileSelectionDialogs }, | 276 prefs::kAllowFileSelectionDialogs }, |
| 277 { Value::TYPE_BOOLEAN, kPolicyImportBookmarks, |
| 278 prefs::kImportBookmarks}, |
| 279 { Value::TYPE_BOOLEAN, kPolicyImportHistory, |
| 280 prefs::kImportHistory}, |
| 281 { Value::TYPE_BOOLEAN, kPolicyImportHomepage, |
| 282 prefs::kImportHomepage}, |
| 283 { Value::TYPE_BOOLEAN, kPolicyImportSearchEngine, |
| 284 prefs::kImportSearchEngine }, |
| 285 { Value::TYPE_BOOLEAN, kPolicyImportSavedPasswords, |
| 286 prefs::kImportSavedPasswords }, |
| 277 { Value::TYPE_INTEGER, kPolicyMaxConnectionsPerProxy, | 287 { Value::TYPE_INTEGER, kPolicyMaxConnectionsPerProxy, |
| 278 prefs::kMaxConnectionsPerProxy }, | 288 prefs::kMaxConnectionsPerProxy }, |
| 279 | 289 |
| 280 #if defined(OS_CHROMEOS) | 290 #if defined(OS_CHROMEOS) |
| 281 { Value::TYPE_BOOLEAN, kPolicyChromeOsLockOnIdleSuspend, | 291 { Value::TYPE_BOOLEAN, kPolicyChromeOsLockOnIdleSuspend, |
| 282 prefs::kEnableScreenLock }, | 292 prefs::kEnableScreenLock }, |
| 283 #endif | 293 #endif |
| 284 }; | 294 }; |
| 285 | 295 |
| 286 const ConfigurationPolicyPrefKeeper::PolicyToPreferenceMapEntry | 296 const ConfigurationPolicyPrefKeeper::PolicyToPreferenceMapEntry |
| (...skipping 782 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1069 { kPolicyAlwaysAuthorizePlugins, Value::TYPE_BOOLEAN, | 1079 { kPolicyAlwaysAuthorizePlugins, Value::TYPE_BOOLEAN, |
| 1070 key::kAlwaysAuthorizePlugins }, | 1080 key::kAlwaysAuthorizePlugins }, |
| 1071 { kPolicyBookmarkBarEnabled, Value::TYPE_BOOLEAN, | 1081 { kPolicyBookmarkBarEnabled, Value::TYPE_BOOLEAN, |
| 1072 key::kBookmarkBarEnabled }, | 1082 key::kBookmarkBarEnabled }, |
| 1073 { kPolicyEditBookmarksEnabled, Value::TYPE_BOOLEAN, | 1083 { kPolicyEditBookmarksEnabled, Value::TYPE_BOOLEAN, |
| 1074 key::kEditBookmarksEnabled }, | 1084 key::kEditBookmarksEnabled }, |
| 1075 { kPolicyAllowFileSelectionDialogs, Value::TYPE_BOOLEAN, | 1085 { kPolicyAllowFileSelectionDialogs, Value::TYPE_BOOLEAN, |
| 1076 key::kAllowFileSelectionDialogs }, | 1086 key::kAllowFileSelectionDialogs }, |
| 1077 { kPolicyDiskCacheDir, Value::TYPE_STRING, | 1087 { kPolicyDiskCacheDir, Value::TYPE_STRING, |
| 1078 key::kDiskCacheDir }, | 1088 key::kDiskCacheDir }, |
| 1089 { kPolicyImportBookmarks, Value::TYPE_BOOLEAN, |
| 1090 key::kImportBookmarks }, |
| 1091 { kPolicyImportHistory, Value::TYPE_BOOLEAN, |
| 1092 key::kImportHistory }, |
| 1093 { kPolicyImportHomepage, Value::TYPE_BOOLEAN, |
| 1094 key::kImportHomepage }, |
| 1095 { kPolicyImportSearchEngine, Value::TYPE_BOOLEAN, |
| 1096 key::kImportSearchEngine }, |
| 1097 { kPolicyImportSavedPasswords, Value::TYPE_BOOLEAN, |
| 1098 key::kImportSavedPasswords }, |
| 1079 { kPolicyMaxConnectionsPerProxy, Value::TYPE_INTEGER, | 1099 { kPolicyMaxConnectionsPerProxy, Value::TYPE_INTEGER, |
| 1080 key::kMaxConnectionsPerProxy }, | 1100 key::kMaxConnectionsPerProxy }, |
| 1081 | 1101 |
| 1082 #if defined(OS_CHROMEOS) | 1102 #if defined(OS_CHROMEOS) |
| 1083 { kPolicyChromeOsLockOnIdleSuspend, Value::TYPE_BOOLEAN, | 1103 { kPolicyChromeOsLockOnIdleSuspend, Value::TYPE_BOOLEAN, |
| 1084 key::kChromeOsLockOnIdleSuspend }, | 1104 key::kChromeOsLockOnIdleSuspend }, |
| 1085 { kPolicyChromeOsReleaseChannel, Value::TYPE_STRING, | 1105 { kPolicyChromeOsReleaseChannel, Value::TYPE_STRING, |
| 1086 key::kChromeOsReleaseChannel }, | 1106 key::kChromeOsReleaseChannel }, |
| 1087 #endif | 1107 #endif |
| 1088 }; | 1108 }; |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1125 // Update the initialization flag. | 1145 // Update the initialization flag. |
| 1126 if (!initialization_complete_ && | 1146 if (!initialization_complete_ && |
| 1127 provider_->IsInitializationComplete()) { | 1147 provider_->IsInitializationComplete()) { |
| 1128 initialization_complete_ = true; | 1148 initialization_complete_ = true; |
| 1129 FOR_EACH_OBSERVER(PrefStore::Observer, observers_, | 1149 FOR_EACH_OBSERVER(PrefStore::Observer, observers_, |
| 1130 OnInitializationCompleted(true)); | 1150 OnInitializationCompleted(true)); |
| 1131 } | 1151 } |
| 1132 } | 1152 } |
| 1133 | 1153 |
| 1134 } // namespace policy | 1154 } // namespace policy |
| OLD | NEW |