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

Unified Diff: chrome/browser/extensions/external_registry_loader_win.cc

Issue 2693223002: Log the error result when observing a registry key fails. (Closed)
Patch Set: Created 3 years, 10 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/external_registry_loader_win.cc
diff --git a/chrome/browser/extensions/external_registry_loader_win.cc b/chrome/browser/extensions/external_registry_loader_win.cc
index 3241d4934db3bf2d494d3395e7a1fc62d40f8fed..b54835aff5923dc09df2e599efa9688b7d330261 100644
--- a/chrome/browser/extensions/external_registry_loader_win.cc
+++ b/chrome/browser/extensions/external_registry_loader_win.cc
@@ -201,24 +201,26 @@ void ExternalRegistryLoader::CompleteLoadAndStartWatchingRegistry() {
LoadFinished();
// Start watching registry.
- if (hklm_key_.Create(HKEY_LOCAL_MACHINE, kRegistryExtensions,
- KEY_NOTIFY | KEY_WOW64_32KEY) == ERROR_SUCCESS) {
+ LONG result = ERROR_SUCCESS;
+ if ((result = hklm_key_.Create(HKEY_LOCAL_MACHINE, kRegistryExtensions,
+ KEY_NOTIFY | KEY_WOW64_32KEY)) ==
+ ERROR_SUCCESS) {
base::win::RegKey::ChangeCallback callback =
base::Bind(&ExternalRegistryLoader::OnRegistryKeyChanged,
base::Unretained(this), base::Unretained(&hklm_key_));
hklm_key_.StartWatching(callback);
} else {
- LOG(WARNING) << "Error observing HKLM.";
+ LOG(WARNING) << "Error observing HKLM: " << result;
lazyboy 2017/02/15 00:19:56 Maybe we should remove logging this and keep only
Wez 2017/02/15 00:33:21 Actually it seems like a legitimate error; IIUC co
}
- if (hkcu_key_.Create(HKEY_CURRENT_USER, kRegistryExtensions, KEY_NOTIFY) ==
- ERROR_SUCCESS) {
+ if ((result = hkcu_key_.Create(HKEY_CURRENT_USER, kRegistryExtensions,
+ KEY_NOTIFY)) == ERROR_SUCCESS) {
base::win::RegKey::ChangeCallback callback =
base::Bind(&ExternalRegistryLoader::OnRegistryKeyChanged,
base::Unretained(this), base::Unretained(&hkcu_key_));
hkcu_key_.StartWatching(callback);
} else {
- LOG(WARNING) << "Error observing HKCU.";
+ LOG(WARNING) << "Error observing HKCU: " << result;
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698