summaryrefslogtreecommitdiffstats
path: root/base/file_version_info_win.cc
diff options
context:
space:
mode:
authorjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-03 20:36:28 +0000
committerjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-03 20:36:28 +0000
commit822e2947f42a96cc29771f15013fe324037a9712 (patch)
treea83ff359afec5eb297bf58f2c44cd8037e89dd04 /base/file_version_info_win.cc
parent0cb7bec2eb1b954e30de75305c974ecfee3c8efb (diff)
downloadchromium_src-822e2947f42a96cc29771f15013fe324037a9712.zip
chromium_src-822e2947f42a96cc29771f15013fe324037a9712.tar.gz
chromium_src-822e2947f42a96cc29771f15013fe324037a9712.tar.bz2
Turn on file access checks on Win.
BUG=60211 Review URL: http://codereview.chromium.org/4222005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@64960 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/file_version_info_win.cc')
-rw-r--r--base/file_version_info_win.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/base/file_version_info_win.cc b/base/file_version_info_win.cc
index d1049b8..6c69708 100644
--- a/base/file_version_info_win.cc
+++ b/base/file_version_info_win.cc
@@ -10,12 +10,14 @@
#include "base/file_version_info.h"
#include "base/logging.h"
#include "base/path_service.h"
+#include "base/thread_restrictions.h"
// This has to be last.
#include <strsafe.h>
FileVersionInfoWin::FileVersionInfoWin(void* data, int language, int code_page)
: language_(language), code_page_(code_page) {
+ base::ThreadRestrictions::AssertIOAllowed();
data_.reset((char*) data);
fixed_file_info_ = NULL;
UINT size;
@@ -43,6 +45,8 @@ FileVersionInfo* FileVersionInfo::CreateFileVersionInfoForCurrentModule() {
// static
FileVersionInfo* FileVersionInfo::CreateFileVersionInfo(
const FilePath& file_path) {
+ base::ThreadRestrictions::AssertIOAllowed();
+
DWORD dummy;
const wchar_t* path = file_path.value().c_str();
DWORD length = ::GetFileVersionInfoSize(path, &dummy);