diff options
author | haruki@chromium.org <haruki@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-08-21 19:50:03 +0000 |
---|---|---|
committer | haruki@chromium.org <haruki@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-08-21 19:50:03 +0000 |
commit | dda29c94364d6dd8896f64032dcc2561a8a217c9 (patch) | |
tree | 16ff93cf3e96ccb065236bdd5f32e05943468cd8 /base/sys_info_posix.cc | |
parent | e7671af36b9ad37c35ccfc742f419bbc3b3eccf6 (diff) | |
download | chromium_src-dda29c94364d6dd8896f64032dcc2561a8a217c9.zip chromium_src-dda29c94364d6dd8896f64032dcc2561a8a217c9.tar.gz chromium_src-dda29c94364d6dd8896f64032dcc2561a8a217c9.tar.bz2 |
Add AssertIOAllowed check in the implementations of SysInfo::AmountOfFreeDiskSpace.
BUG=143335
Review URL: https://chromiumcodereview.appspot.com/10834384
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@152612 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/sys_info_posix.cc')
-rw-r--r-- | base/sys_info_posix.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/base/sys_info_posix.cc b/base/sys_info_posix.cc index 4d7cc4e..3a6bd62 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; |