Chromium Code Reviews
Description[Ext Registry] Do not try to re-watch registry if we are already watching it.
Firstly, registry observer/watcher is already set up, then we do not need
to observe that again. Because we didn't use to call
ExternalLoader::StartLoading more than once before
https://crrev.com/2336403002, this wan't an issue when we added registry
watching code. After we started calling StartLoading > 1nce, we unintentionally
started retrying to observe windows registry if previous observing
failed for some reason. This CL also removes this hard-to-explain retry. The
reasoning is that if we want to retry observing registry, we should be doing
that explicitly (and periodically?) and not rely on whether additional StartLoading
was called or not.
Secondly, RegKey::Watcher fails a DCHECK if we want to re-observe using
same RegKey. This is DCHECK(callback_.is_null()) in
RegKey::Watcher::StartWatching.
BUG=653045
Test=On windows, make chrome have a policy forced extension installed.
Shut down chrome. Manually corrupt the policy installed extension.
Re-laucnch chrome in debug mode: observe no more DCHECK failures.
Review-Url: https://codereview.chromium.org/2796783002
Cr-Commit-Position: refs/heads/master@{#461903}
Committed: https://chromium.googlesource.com/chromium/src/+/36920277941e915314f558ada0a27236c633f751
Patch Set 1 #
Total comments: 4
Patch Set 2 : add test #
Total comments: 2
Patch Set 3 : revert retrying + add assert #
Messages
Total messages: 20 (12 generated)
|
||||||||||||||||||||||||||||||||||||||||||||||