Index: chrome/browser/protector/base_prefs_change.cc |
diff --git a/chrome/browser/protector/base_prefs_change.cc b/chrome/browser/protector/base_prefs_change.cc |
index 0bac9127b4c01f48bbe1a5f16c41ee95014f4f99..7e9dca657c864814b320acf329ffd204f4800101 100644 |
--- a/chrome/browser/protector/base_prefs_change.cc |
+++ b/chrome/browser/protector/base_prefs_change.cc |
@@ -5,8 +5,10 @@ |
#include "chrome/browser/prefs/pref_set_observer.h" |
#include "chrome/browser/profiles/profile.h" |
#include "chrome/browser/protector/base_prefs_change.h" |
+#include "chrome/browser/protector/protected_prefs_watcher.h" |
#include "chrome/browser/protector/protector_service.h" |
#include "chrome/browser/protector/protector_service_factory.h" |
+#include "chrome/browser/protector/protector_utils.h" |
#include "chrome/common/chrome_notification_types.h" |
#include "content/public/browser/notification_service.h" |
@@ -25,6 +27,13 @@ bool BasePrefsChange::Init(Profile* profile) { |
return true; |
} |
+void BasePrefsChange::InitWhenDisabled(Profile* profile) { |
+ // Forcibly set backup to match the actual settings so that no changes are |
+ // detected on future runs. |
+ ProtectorServiceFactory::GetForProfile(profile)->GetPrefsWatcher()-> |
+ ForceUpdateBackup(); |
+} |
+ |
void BasePrefsChange::DismissOnPrefChange(const std::string& pref_name) { |
DCHECK(!pref_observer_->IsObserved(pref_name)); |
pref_observer_->AddPref(pref_name); |