summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chrome/app/policy/policy_templates.json16
-rw-r--r--chrome/browser/bookmarks/bookmark_utils.cc1
-rw-r--r--chrome/browser/policy/config_dir_policy_provider_unittest.cc5
-rw-r--r--chrome/browser/policy/configuration_policy_pref_store.cc4
-rw-r--r--chrome/browser/policy/configuration_policy_pref_store_unittest.cc4
-rw-r--r--chrome/browser/policy/configuration_policy_provider_mac_unittest.cc5
-rw-r--r--chrome/browser/policy/configuration_policy_provider_win_unittest.cc5
-rw-r--r--chrome/common/pref_names.cc3
-rw-r--r--chrome/common/pref_names.h1
9 files changed, 39 insertions, 5 deletions
diff --git a/chrome/app/policy/policy_templates.json b/chrome/app/policy/policy_templates.json
index 38f28d7..3aa302a 100644
--- a/chrome/app/policy/policy_templates.json
+++ b/chrome/app/policy/policy_templates.json
@@ -94,7 +94,7 @@
# persistent IDs for all fields (but not for groups!) are needed. These are
# specified by the 'id' keys of each policy. NEVER CHANGE EXISTING IDs,
# because doing so would break the deployed wire format!
-# For your editing convenience: highest ID currently used: 82
+# For your editing convenience: highest ID currently used: 83
#
# Placeholders:
# The following placeholder strings are automatically substituted:
@@ -1453,6 +1453,20 @@
If you enable or disable this setting, users cannot change or override it in <ph name="PRODUCT_NAME">$1<ex>Google Chrome</ex></ph>.''',
},
+ {
+ 'name': 'EditBookmarksEnabled',
+ 'type': 'main',
+ 'supported_on': ['chrome.*:12-', 'chrome_os:0.12-'],
+ 'features': {'dynamic_refresh': 1},
+ 'example_value': False,
+ 'id': 83,
+ 'caption': '''Enables or disables bookmark editing''',
+ 'desc': '''Enables or disables editing bookmarks in <ph name="PRODUCT_NAME">$1<ex>Google Chrome</ex></ph>.
+
+ If you enable this setting, bookmarks can be added, removed or modified. This is the default.
+
+ If you disable this setting, bookmarks can not be added, removed or modified. Existing bookmarks are still available.''',
+ },
],
'messages': {
# Messages that are not associated to any policies.
diff --git a/chrome/browser/bookmarks/bookmark_utils.cc b/chrome/browser/bookmarks/bookmark_utils.cc
index 379e9fa..bcc49af 100644
--- a/chrome/browser/bookmarks/bookmark_utils.cc
+++ b/chrome/browser/bookmarks/bookmark_utils.cc
@@ -622,6 +622,7 @@ void ToggleWhenVisible(Profile* profile) {
void RegisterUserPrefs(PrefService* prefs) {
prefs->RegisterBooleanPref(prefs::kShowBookmarkBar, false);
+ prefs->RegisterBooleanPref(prefs::kEditBookmarksEnabled, true);
}
void GetURLAndTitleToBookmark(TabContents* tab_contents,
diff --git a/chrome/browser/policy/config_dir_policy_provider_unittest.cc b/chrome/browser/policy/config_dir_policy_provider_unittest.cc
index 595b27d..823e1e2 100644
--- a/chrome/browser/policy/config_dir_policy_provider_unittest.cc
+++ b/chrome/browser/policy/config_dir_policy_provider_unittest.cc
@@ -359,6 +359,9 @@ INSTANTIATE_TEST_CASE_P(
key::kAllowOutdatedPlugins),
ValueTestParams::ForBooleanPolicy(
kPolicyBookmarkBarEnabled,
- key::kBookmarkBarEnabled)));
+ key::kBookmarkBarEnabled),
+ ValueTestParams::ForBooleanPolicy(
+ kPolicyEditBookmarksEnabled,
+ key::kEditBookmarksEnabled)));
} // namespace policy
diff --git a/chrome/browser/policy/configuration_policy_pref_store.cc b/chrome/browser/policy/configuration_policy_pref_store.cc
index 10ed825..f541d65 100644
--- a/chrome/browser/policy/configuration_policy_pref_store.cc
+++ b/chrome/browser/policy/configuration_policy_pref_store.cc
@@ -272,6 +272,8 @@ const ConfigurationPolicyPrefKeeper::PolicyToPreferenceMapEntry
{ Value::TYPE_BOOLEAN, kPolicyBookmarkBarEnabled, prefs::kEnableBookmarkBar },
{ Value::TYPE_BOOLEAN, kPolicyAllowOutdatedPlugins,
prefs::kPluginsAllowOutdated },
+ { Value::TYPE_BOOLEAN, kPolicyEditBookmarksEnabled,
+ prefs::kEditBookmarksEnabled },
#if defined(OS_CHROMEOS)
{ Value::TYPE_BOOLEAN, kPolicyChromeOsLockOnIdleSuspend,
@@ -993,6 +995,8 @@ ConfigurationPolicyPrefStore::GetChromePolicyDefinitionList() {
key::kAllowOutdatedPlugins },
{ kPolicyBookmarkBarEnabled, Value::TYPE_BOOLEAN,
key::kBookmarkBarEnabled },
+ { kPolicyEditBookmarksEnabled, Value::TYPE_BOOLEAN,
+ key::kEditBookmarksEnabled },
#if defined(OS_CHROMEOS)
{ kPolicyChromeOsLockOnIdleSuspend, Value::TYPE_BOOLEAN,
diff --git a/chrome/browser/policy/configuration_policy_pref_store_unittest.cc b/chrome/browser/policy/configuration_policy_pref_store_unittest.cc
index d6f5a57..47adb28 100644
--- a/chrome/browser/policy/configuration_policy_pref_store_unittest.cc
+++ b/chrome/browser/policy/configuration_policy_pref_store_unittest.cc
@@ -209,7 +209,9 @@ INSTANTIATE_TEST_CASE_P(
TypeAndName(kPolicyAllowOutdatedPlugins,
prefs::kPluginsAllowOutdated),
TypeAndName(kPolicyBookmarkBarEnabled,
- prefs::kEnableBookmarkBar)));
+ prefs::kEnableBookmarkBar),
+ TypeAndName(kPolicyEditBookmarksEnabled,
+ prefs::kEditBookmarksEnabled)));
#if defined(OS_CHROMEOS)
INSTANTIATE_TEST_CASE_P(
diff --git a/chrome/browser/policy/configuration_policy_provider_mac_unittest.cc b/chrome/browser/policy/configuration_policy_provider_mac_unittest.cc
index edfbdb2..9494122 100644
--- a/chrome/browser/policy/configuration_policy_provider_mac_unittest.cc
+++ b/chrome/browser/policy/configuration_policy_provider_mac_unittest.cc
@@ -330,6 +330,9 @@ INSTANTIATE_TEST_CASE_P(
key::kAllowOutdatedPlugins),
PolicyTestParams::ForBooleanPolicy(
kPolicyBookmarkBarEnabled,
- key::kBookmarkBarEnabled)));
+ key::kBookmarkBarEnabled),
+ PolicyTestParams::ForBooleanPolicy(
+ kPolicyEditBookmarksEnabled,
+ key::kEditBookmarksEnabled)));
} // namespace policy
diff --git a/chrome/browser/policy/configuration_policy_provider_win_unittest.cc b/chrome/browser/policy/configuration_policy_provider_win_unittest.cc
index 9323e90..2763f15 100644
--- a/chrome/browser/policy/configuration_policy_provider_win_unittest.cc
+++ b/chrome/browser/policy/configuration_policy_provider_win_unittest.cc
@@ -488,6 +488,9 @@ INSTANTIATE_TEST_CASE_P(
key::kAllowOutdatedPlugins),
PolicyTestParams::ForBooleanPolicy(
kPolicyBookmarkBarEnabled,
- key::kBookmarkBarEnabled)));
+ key::kBookmarkBarEnabled),
+ PolicyTestParams::ForBooleanPolicy(
+ kPolicyEditBookmarksEnabled,
+ key::kEditBookmarksEnabled)));
} // namespace policy
diff --git a/chrome/common/pref_names.cc b/chrome/common/pref_names.cc
index 439eb8f..42adbef 100644
--- a/chrome/common/pref_names.cc
+++ b/chrome/common/pref_names.cc
@@ -661,6 +661,9 @@ const char kAutofillNegativeUploadRate[] = "autofill.negative_upload_rate";
// Boolean option set to true on the first run. Non-persistent.
const char kAutofillPersonalDataManagerFirstRun[] = "autofill.pdm.first_run";
+// Modifying bookmarks is completely disabled when this is set to false.
+const char kEditBookmarksEnabled[] = "bookmarks.editing_enabled";
+
// Boolean that is true when the tabstrip is to be laid out vertically down the
// side of the browser window.
const char kUseVerticalTabs[] = "tabs.use_vertical_tabs";
diff --git a/chrome/common/pref_names.h b/chrome/common/pref_names.h
index a69c0fe..00964c7 100644
--- a/chrome/common/pref_names.h
+++ b/chrome/common/pref_names.h
@@ -231,6 +231,7 @@ extern const char kAutofillDialogPlacement[];
extern const char kAutofillPositiveUploadRate[];
extern const char kAutofillNegativeUploadRate[];
extern const char kAutofillPersonalDataManagerFirstRun[];
+extern const char kEditBookmarksEnabled[];
extern const char kUseVerticalTabs[];
extern const char kEnableTranslate[];