summaryrefslogtreecommitdiffstats
path: root/base/file_util.h
diff options
context:
space:
mode:
authorskerner@chromium.org <skerner@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-14 18:50:19 +0000
committerskerner@chromium.org <skerner@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-14 18:50:19 +0000
commitbaedfdf14e911a4e9a3fbf36cd726e065bd08673 (patch)
treec31fa7cc4cc71029b5e433e05301fd7cbdfa1e57 /base/file_util.h
parent485af9bb88177c78dcd905234fe6e543fa108789 (diff)
downloadchromium_src-baedfdf14e911a4e9a3fbf36cd726e065bd08673.zip
chromium_src-baedfdf14e911a4e9a3fbf36cd726e065bd08673.tar.gz
chromium_src-baedfdf14e911a4e9a3fbf36cd726e065bd08673.tar.bz2
If CreateDirectory() fails during extension unpacking, log the exact OS call that failed.
This change is designed to help understand bug 35198, which we can not reproduce locally. BUG=35198 TEST=manual Review URL: http://codereview.chromium.org/2714016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@49703 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/file_util.h')
-rw-r--r--base/file_util.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/base/file_util.h b/base/file_util.h
index b2e176b..a16c5c72 100644
--- a/base/file_util.h
+++ b/base/file_util.h
@@ -281,6 +281,14 @@ bool CreateNewTempDirectory(const FilePath::StringType& prefix,
// already exists. The directory is only readable by the current user.
bool CreateDirectory(const FilePath& full_path);
+#if defined(OS_WIN)
+// Added for debugging an issue where CreateDirectory() fails. LOG(*) does
+// not work, because the failure happens in a sandboxed process.
+// TODO(skerner): Remove once crbug/35198 is resolved.
+bool CreateDirectoryExtraLogging(const FilePath& full_path,
+ std::ostream& error);
+#endif // defined (OS_WIN)
+
// Returns the file size. Returns true on success.
bool GetFileSize(const FilePath& file_path, int64* file_size);