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

Side by Side Diff: chrome/installer/gcapi/gcapi.cc

Issue 1216413002: Fix remaining warnings for -Wmissing-braces and enable on win clang. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Less nesting Created 5 years, 5 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 unified diff | Download patch
« no previous file with comments | « build/config/compiler/BUILD.gn ('k') | cloud_print/service/win/service.gyp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 // NOTE: This code is a legacy utility API for partners to check whether 5 // NOTE: This code is a legacy utility API for partners to check whether
6 // Chrome can be installed and launched. Recent updates are being made 6 // Chrome can be installed and launched. Recent updates are being made
7 // to add new functionality. These updates use code from Chromium, the old 7 // to add new functionality. These updates use code from Chromium, the old
8 // coded against the win32 api directly. If you have an itch to shave a 8 // coded against the win32 api directly. If you have an itch to shave a
9 // yak, feel free to re-write the old code too. 9 // yak, feel free to re-write the old code too.
10 10
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after
249 // For XP itself, we only support SP2 and above. 249 // For XP itself, we only support SP2 and above.
250 return ((version_info.dwMinorVersion > 1) || 250 return ((version_info.dwMinorVersion > 1) ||
251 (version_info.wServicePackMajor >= 2)) ? 251 (version_info.wServicePackMajor >= 2)) ?
252 VERSION_XP_SP2_UP_TO_VISTA : VERSION_BELOW_XP_SP2; 252 VERSION_XP_SP2_UP_TO_VISTA : VERSION_BELOW_XP_SP2;
253 } 253 }
254 254
255 // Note this function should not be called on old Windows versions where these 255 // Note this function should not be called on old Windows versions where these
256 // Windows API are not available. We always invoke this function after checking 256 // Windows API are not available. We always invoke this function after checking
257 // that current OS is Vista or later. 257 // that current OS is Vista or later.
258 bool VerifyAdminGroup() { 258 bool VerifyAdminGroup() {
259 SID_IDENTIFIER_AUTHORITY NtAuthority = SECURITY_NT_AUTHORITY; 259 SID_IDENTIFIER_AUTHORITY NtAuthority = {SECURITY_NT_AUTHORITY};
260 PSID Group; 260 PSID Group;
261 BOOL check = ::AllocateAndInitializeSid(&NtAuthority, 2, 261 BOOL check = ::AllocateAndInitializeSid(&NtAuthority, 2,
262 SECURITY_BUILTIN_DOMAIN_RID, 262 SECURITY_BUILTIN_DOMAIN_RID,
263 DOMAIN_ALIAS_RID_ADMINS, 0, 0, 0, 263 DOMAIN_ALIAS_RID_ADMINS, 0, 0, 0,
264 0, 0, 0, 264 0, 0, 0,
265 &Group); 265 &Group);
266 if (check) { 266 if (check) {
267 if (!::CheckTokenMembership(NULL, Group, &check)) 267 if (!::CheckTokenMembership(NULL, Group, &check))
268 check = FALSE; 268 check = FALSE;
269 } 269 }
(...skipping 519 matching lines...) Expand 10 before | Expand all | Expand 10 after
789 key.WriteValue(kRelaunchAllowedAfterValue, 789 key.WriteValue(kRelaunchAllowedAfterValue,
790 FormatDateOffsetByMonths(6)) != ERROR_SUCCESS || 790 FormatDateOffsetByMonths(6)) != ERROR_SUCCESS ||
791 !SetRelaunchExperimentLabels(relaunch_brandcode, shell_mode)) { 791 !SetRelaunchExperimentLabels(relaunch_brandcode, shell_mode)) {
792 if (error_code) 792 if (error_code)
793 *error_code = RELAUNCH_ERROR_RELAUNCH_FAILED; 793 *error_code = RELAUNCH_ERROR_RELAUNCH_FAILED;
794 return FALSE; 794 return FALSE;
795 } 795 }
796 796
797 return TRUE; 797 return TRUE;
798 } 798 }
OLDNEW
« no previous file with comments | « build/config/compiler/BUILD.gn ('k') | cloud_print/service/win/service.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698