| 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 | 287 |
| 278 #if defined(OS_CHROMEOS) | 288 #if defined(OS_CHROMEOS) |
| 279 { Value::TYPE_BOOLEAN, kPolicyChromeOsLockOnIdleSuspend, | 289 { Value::TYPE_BOOLEAN, kPolicyChromeOsLockOnIdleSuspend, |
| 280 prefs::kEnableScreenLock }, | 290 prefs::kEnableScreenLock }, |
| 281 #endif | 291 #endif |
| 282 }; | 292 }; |
| 283 | 293 |
| 284 const ConfigurationPolicyPrefKeeper::PolicyToPreferenceMapEntry | 294 const ConfigurationPolicyPrefKeeper::PolicyToPreferenceMapEntry |
| 285 ConfigurationPolicyPrefKeeper::kDefaultSearchPolicyMap[] = { | 295 ConfigurationPolicyPrefKeeper::kDefaultSearchPolicyMap[] = { |
| 286 { Value::TYPE_BOOLEAN, kPolicyDefaultSearchProviderEnabled, | 296 { Value::TYPE_BOOLEAN, kPolicyDefaultSearchProviderEnabled, |
| (...skipping 771 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1058 { kPolicyAlwaysAuthorizePlugins, Value::TYPE_BOOLEAN, | 1068 { kPolicyAlwaysAuthorizePlugins, Value::TYPE_BOOLEAN, |
| 1059 key::kAlwaysAuthorizePlugins }, | 1069 key::kAlwaysAuthorizePlugins }, |
| 1060 { kPolicyBookmarkBarEnabled, Value::TYPE_BOOLEAN, | 1070 { kPolicyBookmarkBarEnabled, Value::TYPE_BOOLEAN, |
| 1061 key::kBookmarkBarEnabled }, | 1071 key::kBookmarkBarEnabled }, |
| 1062 { kPolicyEditBookmarksEnabled, Value::TYPE_BOOLEAN, | 1072 { kPolicyEditBookmarksEnabled, Value::TYPE_BOOLEAN, |
| 1063 key::kEditBookmarksEnabled }, | 1073 key::kEditBookmarksEnabled }, |
| 1064 { kPolicyAllowFileSelectionDialogs, Value::TYPE_BOOLEAN, | 1074 { kPolicyAllowFileSelectionDialogs, Value::TYPE_BOOLEAN, |
| 1065 key::kAllowFileSelectionDialogs }, | 1075 key::kAllowFileSelectionDialogs }, |
| 1066 { kPolicyDiskCacheDir, Value::TYPE_STRING, | 1076 { kPolicyDiskCacheDir, Value::TYPE_STRING, |
| 1067 key::kDiskCacheDir }, | 1077 key::kDiskCacheDir }, |
| 1078 { kPolicyImportBookmarks, Value::TYPE_BOOLEAN, |
| 1079 key::kImportBookmarks }, |
| 1080 { kPolicyImportHistory, Value::TYPE_BOOLEAN, |
| 1081 key::kImportHistory }, |
| 1082 { kPolicyImportHomepage, Value::TYPE_BOOLEAN, |
| 1083 key::kImportHomepage }, |
| 1084 { kPolicyImportSearchEngine, Value::TYPE_BOOLEAN, |
| 1085 key::kImportSearchEngine }, |
| 1086 { kPolicyImportSavedPasswords, Value::TYPE_BOOLEAN, |
| 1087 key::kImportSavedPasswords }, |
| 1068 | 1088 |
| 1069 #if defined(OS_CHROMEOS) | 1089 #if defined(OS_CHROMEOS) |
| 1070 { kPolicyChromeOsLockOnIdleSuspend, Value::TYPE_BOOLEAN, | 1090 { kPolicyChromeOsLockOnIdleSuspend, Value::TYPE_BOOLEAN, |
| 1071 key::kChromeOsLockOnIdleSuspend }, | 1091 key::kChromeOsLockOnIdleSuspend }, |
| 1072 { kPolicyChromeOsReleaseChannel, Value::TYPE_STRING, | 1092 { kPolicyChromeOsReleaseChannel, Value::TYPE_STRING, |
| 1073 key::kChromeOsReleaseChannel }, | 1093 key::kChromeOsReleaseChannel }, |
| 1074 #endif | 1094 #endif |
| 1075 }; | 1095 }; |
| 1076 | 1096 |
| 1077 static ConfigurationPolicyProvider::PolicyDefinitionList policy_list = { | 1097 static ConfigurationPolicyProvider::PolicyDefinitionList policy_list = { |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1126 // Update the initialization flag. | 1146 // Update the initialization flag. |
| 1127 if (!initialization_complete_ && | 1147 if (!initialization_complete_ && |
| 1128 provider_->IsInitializationComplete()) { | 1148 provider_->IsInitializationComplete()) { |
| 1129 initialization_complete_ = true; | 1149 initialization_complete_ = true; |
| 1130 FOR_EACH_OBSERVER(PrefStore::Observer, observers_, | 1150 FOR_EACH_OBSERVER(PrefStore::Observer, observers_, |
| 1131 OnInitializationCompleted(true)); | 1151 OnInitializationCompleted(true)); |
| 1132 } | 1152 } |
| 1133 } | 1153 } |
| 1134 | 1154 |
| 1135 } // namespace policy | 1155 } // namespace policy |
| OLD | NEW |