Index: base/sys_info_posix.cc |
diff --git a/base/sys_info_posix.cc b/base/sys_info_posix.cc |
index 4d7cc4e311231b5d24e794d4d83394f923718b66..3a6bd624fc7d2e8d6005dcf0777d708a842a3b4a 100644 |
--- a/base/sys_info_posix.cc |
+++ b/base/sys_info_posix.cc |
@@ -13,6 +13,7 @@ |
#include "base/basictypes.h" |
#include "base/file_util.h" |
#include "base/logging.h" |
+#include "base/threading/thread_restrictions.h" |
#include "base/utf_string_conversions.h" |
#if defined(OS_ANDROID) |
@@ -40,6 +41,8 @@ int SysInfo::NumberOfProcessors() { |
// static |
int64 SysInfo::AmountOfFreeDiskSpace(const FilePath& path) { |
+ base::ThreadRestrictions::AssertIOAllowed(); |
+ |
struct statvfs stats; |
if (statvfs(path.value().c_str(), &stats) != 0) { |
return -1; |