summaryrefslogtreecommitdiffstats
path: root/rlz
diff options
context:
space:
mode:
authorthestig <thestig@chromium.org>2015-09-18 10:50:12 -0700
committerCommit bot <commit-bot@chromium.org>2015-09-18 17:50:51 +0000
commit28d4334b11dd660b4140b99fec36516bb7f30902 (patch)
tree66652d51e72cbdba7ac1f860a83e8c15428a6f47 /rlz
parent269cceaff6e3442372f430c4a6f5e4746b029df8 (diff)
downloadchromium_src-28d4334b11dd660b4140b99fec36516bb7f30902.zip
chromium_src-28d4334b11dd660b4140b99fec36516bb7f30902.tar.gz
chromium_src-28d4334b11dd660b4140b99fec36516bb7f30902.tar.bz2
Remove a block of rlz code for when _WIN32_WINNT < 0x500.
Review URL: https://codereview.chromium.org/1352973002 Cr-Commit-Position: refs/heads/master@{#349707}
Diffstat (limited to 'rlz')
-rw-r--r--rlz/win/lib/machine_id_win.cc24
1 files changed, 0 insertions, 24 deletions
diff --git a/rlz/win/lib/machine_id_win.cc b/rlz/win/lib/machine_id_win.cc
index 3f366fa..e5425c9 100644
--- a/rlz/win/lib/machine_id_win.cc
+++ b/rlz/win/lib/machine_id_win.cc
@@ -69,35 +69,11 @@ bool GetComputerSid(const wchar_t* account_name, SID* sid, DWORD sid_size) {
std::wstring ConvertSidToString(SID* sid) {
std::wstring sid_string;
-#if _WIN32_WINNT >= 0x500
wchar_t* sid_buffer = NULL;
if (ConvertSidToStringSidW(sid, &sid_buffer)) {
sid_string = sid_buffer;
LocalFree(sid_buffer);
}
-#else
- SID_IDENTIFIER_AUTHORITY* sia = ::GetSidIdentifierAuthority(sid);
-
- if(sia->Value[0] || sia->Value[1]) {
- base::SStringPrintf(
- &sid_string, L"S-%d-0x%02hx%02hx%02hx%02hx%02hx%02hx",
- SID_REVISION, (USHORT)sia->Value[0], (USHORT)sia->Value[1],
- (USHORT)sia->Value[2], (USHORT)sia->Value[3], (USHORT)sia->Value[4],
- (USHORT)sia->Value[5]);
- } else {
- ULONG authority = 0;
- for (int i = 2; i < 6; ++i) {
- authority <<= 8;
- authority |= sia->Value[i];
- }
- base::SStringPrintf(&sid_string, L"S-%d-%lu", SID_REVISION, authority);
- }
-
- int sub_auth_count = *::GetSidSubAuthorityCount(sid);
- for(int i = 0; i < sub_auth_count; ++i)
- base::StringAppendF(&sid_string, L"-%lu", *::GetSidSubAuthority(sid, i));
-#endif
-
return sid_string;
}