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

Unified Diff: chrome/browser/password_manager/password_manager_util_win.cc

Issue 1337223002: Fixes to possible GetLastError bugs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed some sandbox changes Created 5 years, 3 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 | « base/debug/stack_trace_win.cc ('k') | sandbox/win/src/process_thread_interception.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/password_manager/password_manager_util_win.cc
diff --git a/chrome/browser/password_manager/password_manager_util_win.cc b/chrome/browser/password_manager/password_manager_util_win.cc
index 994a174dc4ee42af5f6e6264e00abb378ac69aff..d5f7f3e8db3274844e033d02b14d17d243b6d3b7 100644
--- a/chrome/browser/password_manager/password_manager_util_win.cc
+++ b/chrome/browser/password_manager/password_manager_util_win.cc
@@ -129,6 +129,7 @@ bool CheckBlankPasswordWithPrefs(const WCHAR* username,
LOGON32_PROVIDER_DEFAULT,
&handle);
+ auto last_error = GetLastError();
// Win XP and later return ERROR_ACCOUNT_RESTRICTION for blank password.
if (logon_result)
CloseHandle(handle);
@@ -138,7 +139,7 @@ bool CheckBlankPasswordWithPrefs(const WCHAR* username,
// ERROR_ACCOUNT_RESTRICTION.
// http://msdn.microsoft.com/en-us/library/windows/desktop/ms681385
blank_password = (logon_result ||
- GetLastError() == ERROR_ACCOUNT_RESTRICTION);
+ last_error == ERROR_ACCOUNT_RESTRICTION);
}
// Account for clock skew between pulling the password age and
« no previous file with comments | « base/debug/stack_trace_win.cc ('k') | sandbox/win/src/process_thread_interception.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698