| OLD | NEW | 
|---|
| 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 #include "base/win/win_util.h" | 5 #include "base/win/win_util.h" | 
| 6 | 6 | 
| 7 #include <aclapi.h> | 7 #include <aclapi.h> | 
| 8 #include <cfgmgr32.h> | 8 #include <cfgmgr32.h> | 
| 9 #include <lm.h> | 9 #include <lm.h> | 
| 10 #include <powrprof.h> | 10 #include <powrprof.h> | 
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 112   return keyboard_count > 1; | 112   return keyboard_count > 1; | 
| 113 } | 113 } | 
| 114 | 114 | 
| 115 }  // namespace | 115 }  // namespace | 
| 116 | 116 | 
| 117 namespace base { | 117 namespace base { | 
| 118 namespace win { | 118 namespace win { | 
| 119 | 119 | 
| 120 static bool g_crash_on_process_detach = false; | 120 static bool g_crash_on_process_detach = false; | 
| 121 | 121 | 
| 122 void GetNonClientMetrics(NONCLIENTMETRICS_XP* metrics) { | 122 void GetNonClientMetrics(NONCLIENTMETRICS* metrics) { | 
| 123   DCHECK(metrics); | 123   DCHECK(metrics); | 
| 124   metrics->cbSize = sizeof(*metrics); | 124   metrics->cbSize = sizeof(*metrics); | 
| 125   const bool success = !!SystemParametersInfo( | 125   const bool success = | 
| 126       SPI_GETNONCLIENTMETRICS, | 126       !!SystemParametersInfo( | 
| 127       metrics->cbSize, | 127            SPI_GETNONCLIENTMETRICS, metrics->cbSize, metrics, 0); | 
| 128       reinterpret_cast<NONCLIENTMETRICS*>(metrics), |  | 
| 129       0); |  | 
| 130   DCHECK(success); | 128   DCHECK(success); | 
| 131 } | 129 } | 
| 132 | 130 | 
| 133 bool GetUserSidString(std::wstring* user_sid) { | 131 bool GetUserSidString(std::wstring* user_sid) { | 
| 134   // Get the current token. | 132   // Get the current token. | 
| 135   HANDLE token = NULL; | 133   HANDLE token = NULL; | 
| 136   if (!::OpenProcessToken(::GetCurrentProcess(), TOKEN_QUERY, &token)) | 134   if (!::OpenProcessToken(::GetCurrentProcess(), TOKEN_QUERY, &token)) | 
| 137     return false; | 135     return false; | 
| 138   base::win::ScopedHandle token_scoped(token); | 136   base::win::ScopedHandle token_scoped(token); | 
| 139 | 137 | 
| (...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 467 #if defined(_MSC_FULL_VER) | 465 #if defined(_MSC_FULL_VER) | 
| 468   #pragma message(__PPOUT__(_MSC_FULL_VER)) | 466   #pragma message(__PPOUT__(_MSC_FULL_VER)) | 
| 469 #endif | 467 #endif | 
| 470 | 468 | 
| 471 #pragma message("Visual Studio 2012 x86 must be updated to at least Update 1") | 469 #pragma message("Visual Studio 2012 x86 must be updated to at least Update 1") | 
| 472 #error Must install Update 1 to Visual Studio 2012. | 470 #error Must install Update 1 to Visual Studio 2012. | 
| 473 #endif | 471 #endif | 
| 474 | 472 | 
| 475 #endif  // _MSC_VER | 473 #endif  // _MSC_VER | 
| 476 | 474 | 
| OLD | NEW | 
|---|