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

Unified Diff: cloud_print/virtual_driver/win/port_monitor/port_monitor_dll.cc

Issue 921913002: Move GetProcessIntegrityLevel to file_info.h and remove the handle argument. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix cast Created 5 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 | « chrome/installer/util/legacy_firewall_manager_win_unittest.cc ('k') | rlz/win/lib/process_info.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cloud_print/virtual_driver/win/port_monitor/port_monitor_dll.cc
diff --git a/cloud_print/virtual_driver/win/port_monitor/port_monitor_dll.cc b/cloud_print/virtual_driver/win/port_monitor/port_monitor_dll.cc
index b5bb451b322896728b2f765e8c9e8d3b37ee828f..d2d1119c24fd5c2c9aaa931b314414abc3763139 100644
--- a/cloud_print/virtual_driver/win/port_monitor/port_monitor_dll.cc
+++ b/cloud_print/virtual_driver/win/port_monitor/port_monitor_dll.cc
@@ -16,7 +16,7 @@
#include "base/command_line.h"
#include "base/files/file_util.h"
#include "base/logging.h"
-#include "base/process/process.h"
+#include "base/process/process_info.h"
#include "base/strings/string16.h"
#include "base/win/registry.h"
#include "base/win/scoped_handle.h"
@@ -55,13 +55,8 @@ bool CanRegister() {
return false;
}
if (base::win::GetVersion() >= base::win::VERSION_VISTA) {
- base::IntegrityLevel level = base::INTEGRITY_UNKNOWN;
- if (!GetProcessIntegrityLevel(base::GetCurrentProcessHandle(), &level)) {
+ if (base::GetCurrentProcessIntegrityLevel() != base::HIGH_INTEGRITY)
return false;
- }
- if (level != base::HIGH_INTEGRITY) {
- return false;
- }
}
return true;
}
« no previous file with comments | « chrome/installer/util/legacy_firewall_manager_win_unittest.cc ('k') | rlz/win/lib/process_info.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698