| Index: syzygy/agent/asan/registry_cache.cc
|
| diff --git a/syzygy/agent/asan/registry_cache.cc b/syzygy/agent/asan/registry_cache.cc
|
| index 8d6a42ddc1f925135ae936b87dae9ca7f73820fe..12a3d24151e378f75ffa99942066aff19e925171 100644
|
| --- a/syzygy/agent/asan/registry_cache.cc
|
| +++ b/syzygy/agent/asan/registry_cache.cc
|
| @@ -59,7 +59,18 @@ RegistryCache::RegistryCache(const wchar_t* registry_name,
|
| registry_cache_key_.append(registry_name);
|
| }
|
|
|
| +// static
|
| +bool RegistryCache::RegistryAvailable() {
|
| + base::win::RegKey test_key(kRegistryRootKey, L"SYSTEM", KEY_ALL_ACCESS);
|
| + if (!test_key.Valid())
|
| + return false;
|
| + test_key.Close();
|
| + return true;
|
| +}
|
| +
|
| bool RegistryCache::Init() {
|
| + DCHECK(RegistryAvailable());
|
| +
|
| // Always start by cleaning up the values, to limit the size of entries in
|
| // the registry.
|
| CleanUp();
|
|
|