| Index: chrome/browser/extensions/extension_prefs.cc
|
| diff --git a/chrome/browser/extensions/extension_prefs.cc b/chrome/browser/extensions/extension_prefs.cc
|
| index f318583d433e118302717c5a3de3cd89c2421587..766e3db7a2c074e49c6cff29b425a835c09daa2c 100644
|
| --- a/chrome/browser/extensions/extension_prefs.cc
|
| +++ b/chrome/browser/extensions/extension_prefs.cc
|
| @@ -159,11 +159,9 @@ class ScopedExtensionPrefUpdate : public DictionaryPrefUpdate {
|
| ScopedExtensionPrefUpdate(PrefService* service,
|
| const std::string& extension_id) :
|
| DictionaryPrefUpdate(service, ExtensionPrefs::kExtensionsPref),
|
| - prefs_(service),
|
| extension_id_(extension_id) {}
|
|
|
| virtual ~ScopedExtensionPrefUpdate() {
|
| - prefs_->ScheduleSavePersistentPrefs();
|
| }
|
|
|
| virtual DictionaryValue* Get() {
|
| @@ -178,7 +176,6 @@ class ScopedExtensionPrefUpdate : public DictionaryPrefUpdate {
|
| }
|
|
|
| private:
|
| - PrefService* prefs_;
|
| const std::string extension_id_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(ScopedExtensionPrefUpdate);
|
| @@ -195,12 +192,10 @@ class ScopedExtensionControlledPrefUpdate : public DictionaryPrefUpdate {
|
| const std::string& extension_id,
|
| const std::string& incognito_or_regular_path) :
|
| DictionaryPrefUpdate(service, ExtensionPrefs::kExtensionsPref),
|
| - prefs_(service),
|
| extension_id_(extension_id),
|
| incognito_or_regular_path_(incognito_or_regular_path) {}
|
|
|
| virtual ~ScopedExtensionControlledPrefUpdate() {
|
| - prefs_->ScheduleSavePersistentPrefs();
|
| }
|
|
|
| virtual DictionaryValue* Get() {
|
| @@ -216,7 +211,6 @@ class ScopedExtensionControlledPrefUpdate : public DictionaryPrefUpdate {
|
| }
|
|
|
| private:
|
| - PrefService* prefs_;
|
| const std::string extension_id_;
|
| const std::string incognito_or_regular_path_;
|
|
|
| @@ -310,7 +304,6 @@ void ExtensionPrefs::MakePathsRelative() {
|
| extension_dict->SetString(kPrefPath,
|
| MakePathRelative(install_directory_, path));
|
| }
|
| - SavePrefs();
|
| }
|
|
|
| void ExtensionPrefs::MakePathsAbsolute(DictionaryValue* dict) {
|
| @@ -516,10 +509,6 @@ void ExtensionPrefs::SetExtensionPrefPermissionSet(
|
| }
|
| }
|
|
|
| -void ExtensionPrefs::SavePrefs() {
|
| - prefs_->ScheduleSavePersistentPrefs();
|
| -}
|
| -
|
| // static
|
| bool ExtensionPrefs::IsBlacklistBitSet(DictionaryValue* ext) {
|
| return ReadBooleanFromPref(ext, kPrefBlacklist);
|
| @@ -1006,7 +995,6 @@ void ExtensionPrefs::SetToolbarOrder(
|
| iter != extension_ids.end(); ++iter) {
|
| toolbar_order->Append(new StringValue(*iter));
|
| }
|
| - SavePrefs();
|
| }
|
|
|
| void ExtensionPrefs::OnExtensionInstalled(
|
| @@ -1170,10 +1158,7 @@ void ExtensionPrefs::DeleteExtensionPrefs(const std::string& extension_id) {
|
| content_settings_store_->UnregisterExtension(extension_id);
|
| DictionaryPrefUpdate update(prefs_, kExtensionsPref);
|
| DictionaryValue* dict = update.Get();
|
| - if (dict->HasKey(extension_id)) {
|
| - dict->Remove(extension_id, NULL);
|
| - SavePrefs();
|
| - }
|
| + dict->Remove(extension_id, NULL);
|
| }
|
|
|
| const DictionaryValue* ExtensionPrefs::GetExtensionPref(
|
| @@ -1380,7 +1365,6 @@ bool ExtensionPrefs::GetWebStoreLogin(std::string* result) {
|
|
|
| void ExtensionPrefs::SetWebStoreLogin(const std::string& login) {
|
| prefs_->SetString(kWebStoreLogin, login);
|
| - SavePrefs();
|
| }
|
|
|
| int ExtensionPrefs::GetAppLaunchIndex(const std::string& extension_id) {
|
|
|