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

Side by Side Diff: base/win_util.h

Issue 115553: Remove TRACK_HWND_CREATION/TRACK_HWND_DESTRUCTION macro since the bug it was ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | base/win_util.cc » ('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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 #ifndef BASE_WIN_UTIL_H__ 5 #ifndef BASE_WIN_UTIL_H__
6 #define BASE_WIN_UTIL_H__ 6 #define BASE_WIN_UTIL_H__
7 7
8 #include <windows.h> 8 #include <windows.h>
9 #include <aclapi.h> 9 #include <aclapi.h>
10 10
11 #include <string> 11 #include <string>
12 12
13 #include "base/tracked.h"
14
15 namespace win_util { 13 namespace win_util {
16 14
17 // NOTE: Keep these in order so callers can do things like 15 // NOTE: Keep these in order so callers can do things like
18 // "if (GetWinVersion() > WINVERSION_2000) ...". It's OK to change the values, 16 // "if (GetWinVersion() > WINVERSION_2000) ...". It's OK to change the values,
19 // though. 17 // though.
20 enum WinVersion { 18 enum WinVersion {
21 WINVERSION_PRE_2000 = 0, // Not supported 19 WINVERSION_PRE_2000 = 0, // Not supported
22 WINVERSION_2000 = 1, 20 WINVERSION_2000 = 1,
23 WINVERSION_XP = 2, 21 WINVERSION_XP = 2,
24 WINVERSION_SERVER_2003 = 3, 22 WINVERSION_SERVER_2003 = 3,
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 // if the OS is Vista. 97 // if the OS is Vista.
100 bool UserAccountControlIsEnabled(); 98 bool UserAccountControlIsEnabled();
101 99
102 // Use the Win32 API FormatMessage() function to generate a string, using 100 // Use the Win32 API FormatMessage() function to generate a string, using
103 // Windows's default Message Compiled resources; ignoring the inserts. 101 // Windows's default Message Compiled resources; ignoring the inserts.
104 std::wstring FormatMessage(unsigned messageid); 102 std::wstring FormatMessage(unsigned messageid);
105 103
106 // Uses the last Win32 error to generate a human readable message string. 104 // Uses the last Win32 error to generate a human readable message string.
107 std::wstring FormatLastWin32Error(); 105 std::wstring FormatLastWin32Error();
108 106
109 // These 2 methods are used to track HWND creation/destruction to investigate
110 // a mysterious crasher http://crbugs.com/4714 (crasher in on NCDestroy) that
111 // might be caused by a multiple delete of an HWND.
112 void NotifyHWNDCreation(const tracked_objects::Location& from_here, HWND hwnd);
113 void NotifyHWNDDestruction(const tracked_objects::Location& from_here,
114 HWND hwnd);
115
116 #define TRACK_HWND_CREATION(hwnd) win_util::NotifyHWNDCreation(FROM_HERE, hwnd)
117 #define TRACK_HWND_DESTRUCTION(hwnd) \
118 win_util::NotifyHWNDDestruction(FROM_HERE, hwnd)
119
120 } // namespace win_util 107 } // namespace win_util
121 108
122 #endif // BASE_WIN_UTIL_H__ 109 #endif // BASE_WIN_UTIL_H__
OLDNEW
« no previous file with comments | « no previous file | base/win_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698