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

Unified Diff: base/sys_info_posix.cc

Issue 10834384: Add AssertIOAllowed check in the SysInfo::AmountOfFreeDiskSpace. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 4 months 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 | « no previous file | base/sys_info_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « no previous file | base/sys_info_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698