summaryrefslogtreecommitdiffstats
path: root/chrome_frame/utils.cc
diff options
context:
space:
mode:
authorrobertshield@chromium.org <robertshield@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-03 00:44:35 +0000
committerrobertshield@chromium.org <robertshield@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-03 00:44:35 +0000
commit74ecb5a48410545f8b52019e0466fa4ab4336740 (patch)
tree30c2965f1b3b03e54ae254ed396cf6e085b69839 /chrome_frame/utils.cc
parent236c3feac542f868d7f2ddc7f62e98f9bc3196c3 (diff)
downloadchromium_src-74ecb5a48410545f8b52019e0466fa4ab4336740.zip
chromium_src-74ecb5a48410545f8b52019e0466fa4ab4336740.tar.gz
chromium_src-74ecb5a48410545f8b52019e0466fa4ab4336740.tar.bz2
Correct a problem whereby the prefetching experiment would never be scheduled for updates.
Review URL: http://codereview.chromium.org/3362001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@58440 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame/utils.cc')
-rw-r--r--chrome_frame/utils.cc15
1 files changed, 15 insertions, 0 deletions
diff --git a/chrome_frame/utils.cc b/chrome_frame/utils.cc
index e8dfb4b..31cf389 100644
--- a/chrome_frame/utils.cc
+++ b/chrome_frame/utils.cc
@@ -7,6 +7,8 @@
#include <shlobj.h>
#include <wininet.h>
+#include <atlsecurity.h>
+
#include "base/file_util.h"
#include "base/file_version_info.h"
#include "base/lazy_instance.h"
@@ -1127,6 +1129,19 @@ bool IsIBrowserServicePatchEnabled() {
return patch_method == PATCH_METHOD_IBROWSER;
}
+bool IsSystemProcess() {
+ bool is_system = false;
+ CAccessToken process_token;
+ if (process_token.GetProcessToken(TOKEN_QUERY, GetCurrentProcess())) {
+ CSid logon_sid;
+ if (process_token.GetUser(&logon_sid)) {
+ is_system = logon_sid == Sids::System();
+ }
+ }
+ return is_system;
+}
+
+
std::string BindStatus2Str(ULONG bind_status) {
std::string s;
static const char* const bindstatus_txt[] = {