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

Side by Side Diff: chrome/browser/password_manager/password_manager_util_win.cc

Issue 1513043002: clang/win: Let remaining chromium_code targets build with -Wextra. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 5 years 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // windows.h must be first otherwise Win8 SDK breaks. 5 // windows.h must be first otherwise Win8 SDK breaks.
6 #include <windows.h> 6 #include <windows.h>
7 #include <LM.h> 7 #include <LM.h>
8 #include <wincred.h> 8 #include <wincred.h>
9 9
10 // SECURITY_WIN32 must be defined in order to get 10 // SECURITY_WIN32 must be defined in order to get
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
228 bool retval = false; 228 bool retval = false;
229 CREDUI_INFO cui = {}; 229 CREDUI_INFO cui = {};
230 WCHAR username[CREDUI_MAX_USERNAME_LENGTH+1] = {}; 230 WCHAR username[CREDUI_MAX_USERNAME_LENGTH+1] = {};
231 WCHAR displayname[CREDUI_MAX_USERNAME_LENGTH+1] = {}; 231 WCHAR displayname[CREDUI_MAX_USERNAME_LENGTH+1] = {};
232 WCHAR password[CREDUI_MAX_PASSWORD_LENGTH+1] = {}; 232 WCHAR password[CREDUI_MAX_PASSWORD_LENGTH+1] = {};
233 DWORD username_length = CREDUI_MAX_USERNAME_LENGTH; 233 DWORD username_length = CREDUI_MAX_USERNAME_LENGTH;
234 base::string16 product_name = l10n_util::GetStringUTF16(IDS_PRODUCT_NAME); 234 base::string16 product_name = l10n_util::GetStringUTF16(IDS_PRODUCT_NAME);
235 base::string16 password_prompt = 235 base::string16 password_prompt =
236 l10n_util::GetStringUTF16(IDS_PASSWORDS_PAGE_AUTHENTICATION_PROMPT); 236 l10n_util::GetStringUTF16(IDS_PASSWORDS_PAGE_AUTHENTICATION_PROMPT);
237 HANDLE handle = INVALID_HANDLE_VALUE; 237 HANDLE handle = INVALID_HANDLE_VALUE;
238 int tries = 0; 238 size_t tries = 0;
239 bool use_displayname = false; 239 bool use_displayname = false;
240 bool use_principalname = false; 240 bool use_principalname = false;
241 DWORD logon_result = 0; 241 DWORD logon_result = 0;
242 242
243 // Disable password manager reauthentication before Windows 7. 243 // Disable password manager reauthentication before Windows 7.
244 // This is because of an interaction between LogonUser() and the sandbox. 244 // This is because of an interaction between LogonUser() and the sandbox.
245 // http://crbug.com/345916 245 // http://crbug.com/345916
246 if (base::win::GetVersion() < base::win::VERSION_WIN7) 246 if (base::win::GetVersion() < base::win::VERSION_WIN7)
247 return true; 247 return true;
248 248
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
317 } 317 }
318 } 318 }
319 SecureZeroMemory(password, sizeof(password)); 319 SecureZeroMemory(password, sizeof(password));
320 } 320 }
321 } while (credErr == NO_ERROR && 321 } while (credErr == NO_ERROR &&
322 (retval == false && tries < kMaxPasswordRetries)); 322 (retval == false && tries < kMaxPasswordRetries));
323 return retval; 323 return retval;
324 } 324 }
325 325
326 } // namespace password_manager_util_win 326 } // namespace password_manager_util_win
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698