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

Unified Diff: base/file_util_mac.mm

Issue 4133005: Mac: Add AssertIOAllowed() call to CopyFile() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 10 years, 2 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/file_util_mac.mm
diff --git a/base/file_util_mac.mm b/base/file_util_mac.mm
index 811799c39fe0aa02ece3133851602a74a8a3be00..43bf6e9c744eeea77c7e81ab4edb521668ca28ed 100644
--- a/base/file_util_mac.mm
+++ b/base/file_util_mac.mm
@@ -10,6 +10,7 @@
#include "base/basictypes.h"
#include "base/file_path.h"
#include "base/string_util.h"
+#include "base/thread_restrictions.h"
namespace file_util {
@@ -26,6 +27,7 @@ bool GetShmemTempDir(FilePath* path) {
}
bool CopyFile(const FilePath& from_path, const FilePath& to_path) {
+ base::ThreadRestrictions::AssertIOAllowed();
return (copyfile(from_path.value().c_str(),
to_path.value().c_str(), NULL, COPYFILE_ALL) == 0);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698