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

Unified Diff: base/win/win_util.cc

Issue 148083012: Merge 246600 "Add Windows utillity function to verify if a compu..." (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1750/src/
Patch Set: Created 6 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/win/win_util.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/win/win_util.cc
===================================================================
--- base/win/win_util.cc (revision 249340)
+++ base/win/win_util.cc (working copy)
@@ -5,6 +5,7 @@
#include "base/win/win_util.h"
#include <aclapi.h>
+#include <lm.h>
#include <shellapi.h>
#include <shlobj.h>
#include <shobjidl.h> // Must be before propkey.
@@ -355,6 +356,16 @@
return ret;
}
+bool IsEnrolledToDomain() {
+ LPWSTR domain;
+ NETSETUP_JOIN_STATUS join_status;
+ if(::NetGetJoinInformation(NULL, &domain, &join_status) != NERR_Success)
+ return false;
+ ::NetApiBufferFree(domain);
+
+ return join_status == ::NetSetupDomainName;
+}
+
} // namespace win
} // namespace base
« no previous file with comments | « base/win/win_util.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698