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

Side by Side Diff: base/win/win_util.cc

Issue 697183003: Fix more Windows compile errors (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: remove NONCLIENTMETRICS_XP Created 6 years, 1 month 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 | « base/win/win_util.h ('k') | sky/engine/BUILD.gn » ('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 #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
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
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
OLDNEW
« no previous file with comments | « base/win/win_util.h ('k') | sky/engine/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698