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

Unified Diff: base/sys_info_win.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 | « base/sys_info_posix.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/sys_info_win.cc
diff --git a/base/sys_info_win.cc b/base/sys_info_win.cc
index 78c773f2d99923866f310dbec1793b0320f9bd22..87ce66d82b5c75deeac08875bd1aa3fddbf394dd 100644
--- a/base/sys_info_win.cc
+++ b/base/sys_info_win.cc
@@ -10,6 +10,7 @@
#include "base/logging.h"
#include "base/memory/scoped_ptr.h"
#include "base/stringprintf.h"
+#include "base/threading/thread_restrictions.h"
#include "base/win/windows_version.h"
namespace base {
@@ -36,6 +37,8 @@ int64 SysInfo::AmountOfPhysicalMemory() {
// static
int64 SysInfo::AmountOfFreeDiskSpace(const FilePath& path) {
+ base::ThreadRestrictions::AssertIOAllowed();
+
ULARGE_INTEGER available, total, free;
if (!GetDiskFreeSpaceExW(path.value().c_str(), &available, &total, &free)) {
return -1;
« no previous file with comments | « base/sys_info_posix.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698