Commit 48728ff5 authored by thakis@chromium.org's avatar thakis@chromium.org

clang/win: Fix a Wenum-compare warning and a few Wwritable-strings warnings.

BUG=82385
R=rnk@chromium.org
TBR=jochen

Review URL: https://codereview.chromium.org/405123002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@284447 0039d316-1c4b-4281-b951-d872f2087c98
parent 76df22e7
...@@ -178,7 +178,7 @@ TEST(TimeTicks, TimerPerformance) { ...@@ -178,7 +178,7 @@ TEST(TimeTicks, TimerPerformance) {
typedef TimeTicks (*TestFunc)(); typedef TimeTicks (*TestFunc)();
struct TestCase { struct TestCase {
TestFunc func; TestFunc func;
char *description; const char *description;
}; };
// Cheating a bit here: assumes sizeof(TimeTicks) == sizeof(Time) // Cheating a bit here: assumes sizeof(TimeTicks) == sizeof(Time)
// in order to create a single test case list. // in order to create a single test case list.
......
...@@ -38,7 +38,7 @@ enum { ...@@ -38,7 +38,7 @@ enum {
void MakeContextMenuItem(HMENU menu, void MakeContextMenuItem(HMENU menu,
int menu_index, int menu_index,
LPTSTR text, LPCTSTR text,
UINT id, UINT id,
bool enabled) { bool enabled) {
MENUITEMINFO mii = {0}; MENUITEMINFO mii = {0};
...@@ -47,7 +47,7 @@ void MakeContextMenuItem(HMENU menu, ...@@ -47,7 +47,7 @@ void MakeContextMenuItem(HMENU menu,
mii.fState = enabled ? MFS_ENABLED : (MF_DISABLED | MFS_GRAYED); mii.fState = enabled ? MFS_ENABLED : (MF_DISABLED | MFS_GRAYED);
mii.fType = MFT_STRING; mii.fType = MFT_STRING;
mii.wID = id; mii.wID = id;
mii.dwTypeData = text; mii.dwTypeData = const_cast<LPTSTR>(text);
InsertMenuItem(menu, menu_index, TRUE, &mii); InsertMenuItem(menu, menu_index, TRUE, &mii);
} }
......
...@@ -172,7 +172,7 @@ bool ProcessInfo::HasAdminRights() { ...@@ -172,7 +172,7 @@ bool ProcessInfo::HasAdminRights() {
if (SUCCEEDED(GetElevationType(&elevation)) && if (SUCCEEDED(GetElevationType(&elevation)) &&
base::GetProcessIntegrityLevel(base::GetCurrentProcessHandle(), &level)) base::GetProcessIntegrityLevel(base::GetCurrentProcessHandle(), &level))
has_rights = (elevation == TokenElevationTypeFull) || has_rights = (elevation == TokenElevationTypeFull) ||
(level == HIGH_INTEGRITY); (level == base::HIGH_INTEGRITY);
} else { } else {
long group = 0; long group = 0;
if (GetUserGroup(&group)) if (GetUserGroup(&group))
......
...@@ -13,13 +13,6 @@ namespace rlz_lib { ...@@ -13,13 +13,6 @@ namespace rlz_lib {
class ProcessInfo { class ProcessInfo {
public: public:
enum IntegrityLevel {
INTEGRITY_UNKNOWN,
LOW_INTEGRITY,
MEDIUM_INTEGRITY,
HIGH_INTEGRITY,
};
// All these functions cache the result after first run. // All these functions cache the result after first run.
static bool IsRunningAsSystem(); static bool IsRunningAsSystem();
static bool HasAdminRights(); // System / Admin / High Elevation on Vista static bool HasAdminRights(); // System / Admin / High Elevation on Vista
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment