Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4050)

Unified Diff: chrome/browser/protector/base_prefs_change.cc

Issue 10065016: [protector] Refactoring of --no-protector code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge Created 8 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/protector/base_prefs_change.h ('k') | chrome/browser/protector/base_setting_change.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « chrome/browser/protector/base_prefs_change.h ('k') | chrome/browser/protector/base_setting_change.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698