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

Unified Diff: base/file_version_info_win.cc

Issue 4222005: Turn on file access checks on Win. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Second try Created 10 years, 1 month 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 | « base/file_util_win.cc ('k') | base/platform_file_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/file_version_info_win.cc
===================================================================
--- base/file_version_info_win.cc (revision 64981)
+++ base/file_version_info_win.cc (working copy)
@@ -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 @@
// 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);
« no previous file with comments | « base/file_util_win.cc ('k') | base/platform_file_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698