summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorajwong@chromium.org <ajwong@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-08-17 21:43:33 +0000
committerajwong@chromium.org <ajwong@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-08-17 21:43:33 +0000
commit37bd9d16a6067f096dc71694d792bc2d85faf84e (patch)
treee4b034d3bf21a64b6535cb33ce73f6e0834d1809
parent89f5c647743906e90789e1ee04cd6eddeba52482 (diff)
downloadchromium_src-37bd9d16a6067f096dc71694d792bc2d85faf84e.zip
chromium_src-37bd9d16a6067f096dc71694d792bc2d85faf84e.tar.gz
chromium_src-37bd9d16a6067f096dc71694d792bc2d85faf84e.tar.bz2
Reset the Policy Change notification watcher before reading the policy.
As is, if the policy is changed while we are reading the individual values from the registry, the notification will be silently dropped causing us to have a stale policy. BUG=93146 TEST=none Review URL: http://codereview.chromium.org/7671008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@97215 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/policy/configuration_policy_loader_win.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/chrome/browser/policy/configuration_policy_loader_win.cc b/chrome/browser/policy/configuration_policy_loader_win.cc
index 87e6056..9677d8a 100644
--- a/chrome/browser/policy/configuration_policy_loader_win.cc
+++ b/chrome/browser/policy/configuration_policy_loader_win.cc
@@ -69,8 +69,10 @@ void ConfigurationPolicyLoaderWin::SetupWatches() {
void ConfigurationPolicyLoaderWin::Reload() {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
- AsynchronousPolicyLoader::Reload();
+ // Reset the watches BEFORE reading the individual policies to avoid
+ // missing a change notification.
SetupWatches();
+ AsynchronousPolicyLoader::Reload();
}
void ConfigurationPolicyLoaderWin::OnObjectSignaled(HANDLE object) {