Index: base/win/win_util.cc |
diff --git a/base/win/win_util.cc b/base/win/win_util.cc |
index 8a9d6229e7d3399d02f457756cdca29f5ca14d4a..8517c8f82571342ca51d3036c9fb0f62a75f3216 100644 |
--- a/base/win/win_util.cc |
+++ b/base/win/win_util.cc |
@@ -71,6 +71,15 @@ bool GetUserSidString(std::wstring* user_sid) { |
return true; |
} |
+std::string GetComputerName() { |
+ char computer_name[MAX_COMPUTERNAME_LENGTH + 1]; |
+ DWORD size = sizeof(computer_name); |
+ if (GetComputerNameA(computer_name, &size)) { |
+ return computer_name; |
+ } |
+ return ""; |
darin (slow to review)
2011/08/31 05:52:01
return std::string();
Yaron
2011/08/31 23:23:22
Done.
|
+} |
+ |
bool IsShiftPressed() { |
return (::GetKeyState(VK_SHIFT) & 0x8000) == 0x8000; |
} |