summaryrefslogtreecommitdiffstats
path: root/base/file_util.h
diff options
context:
space:
mode:
authoryuzo@chromium.org <yuzo@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-21 01:52:06 +0000
committeryuzo@chromium.org <yuzo@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-21 01:52:06 +0000
commit130e036f019117d3341c2a15d06e5004e32c9501 (patch)
treeb90f389365f99a0eeb0a418796bdd4d0246ea228 /base/file_util.h
parent96373d08aa941358daef07d6a5c6ddf161ddb51a (diff)
downloadchromium_src-130e036f019117d3341c2a15d06e5004e32c9501.zip
chromium_src-130e036f019117d3341c2a15d06e5004e32c9501.tar.gz
chromium_src-130e036f019117d3341c2a15d06e5004e32c9501.tar.bz2
file_util.h won't compile if UNIT_TEST and OS_WIN are defined.
src\base/file_util.h(524) : error C2664: 'GetNamedSecurityInfoW' : cannot convert parameter 1 from 'const wchar_t *' to 'LPWSTR' BUG=none TEST=none Review URL: http://codereview.chromium.org/1582040 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@45142 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/file_util.h')
-rw-r--r--base/file_util.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/base/file_util.h b/base/file_util.h
index 2e509bb..4473678 100644
--- a/base/file_util.h
+++ b/base/file_util.h
@@ -519,7 +519,8 @@ inline bool MakeFileUnreadable(const FilePath& path) {
#elif defined(OS_WIN)
PACL old_dacl;
PSECURITY_DESCRIPTOR security_descriptor;
- if (GetNamedSecurityInfo(path.value().c_str(), SE_FILE_OBJECT,
+ if (GetNamedSecurityInfo(const_cast<wchar_t*>(path.value().c_str()),
+ SE_FILE_OBJECT,
DACL_SECURITY_INFORMATION, NULL, NULL, &old_dacl,
NULL, &security_descriptor) != ERROR_SUCCESS)
return false;