summaryrefslogtreecommitdiffstats
path: root/base
diff options
context:
space:
mode:
authoraa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-02-05 03:22:38 +0000
committeraa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-02-05 03:22:38 +0000
commit354002bbf04a83faec5a14ed0ea3c3c7e77c2791 (patch)
tree4f0ed39d1dc6926fbb2c6fcc40d7c2dd52997370 /base
parentfd1fbb75f1d2b75b8ba29f98fd4489677e664952 (diff)
downloadchromium_src-354002bbf04a83faec5a14ed0ea3c3c7e77c2791.zip
chromium_src-354002bbf04a83faec5a14ed0ea3c3c7e77c2791.tar.gz
chromium_src-354002bbf04a83faec5a14ed0ea3c3c7e77c2791.tar.bz2
Add some more desperate logging attempting to understand crasher.
BUG=108724 TBR=yoz@chromium.org Review URL: https://chromiumcodereview.appspot.com/9309089 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@120502 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base')
-rw-r--r--base/file_util.cc2
-rw-r--r--base/file_util.h2
-rw-r--r--base/file_util_win.cc6
-rw-r--r--base/scoped_temp_dir.cc3
4 files changed, 13 insertions, 0 deletions
diff --git a/base/file_util.cc b/base/file_util.cc
index 8f67cc3..bb897f3 100644
--- a/base/file_util.cc
+++ b/base/file_util.cc
@@ -33,6 +33,8 @@ static const int kMaxUniqueFiles = 100;
namespace file_util {
+bool g_bug108724_debug = false;
+
bool EndsWithSeparator(const FilePath& path) {
FilePath::StringType value = path.value();
if (value.empty())
diff --git a/base/file_util.h b/base/file_util.h
index 53264c1..177711e 100644
--- a/base/file_util.h
+++ b/base/file_util.h
@@ -44,6 +44,8 @@ class Time;
namespace file_util {
+extern bool g_bug108724_debug;
+
//-----------------------------------------------------------------------------
// Functions that operate purely on a path string w/o touching the filesystem:
diff --git a/base/file_util_win.cc b/base/file_util_win.cc
index eb72afb..4723b96 100644
--- a/base/file_util_win.cc
+++ b/base/file_util_win.cc
@@ -101,6 +101,8 @@ bool Delete(const FilePath& path, bool recursive) {
// into the rest of the buffer.
wchar_t double_terminated_path[MAX_PATH + 1] = {0};
#pragma warning(suppress:4996) // don't complain about wcscpy deprecation
+ if (g_bug108724_debug)
+ LOG(WARNING) << "copying ";
wcscpy(double_terminated_path, path.value().c_str());
SHFILEOPSTRUCT file_operation = {0};
@@ -109,7 +111,11 @@ bool Delete(const FilePath& path, bool recursive) {
file_operation.fFlags = FOF_NOERRORUI | FOF_SILENT | FOF_NOCONFIRMATION;
if (!recursive)
file_operation.fFlags |= FOF_NORECURSION | FOF_FILESONLY;
+ if (g_bug108724_debug)
+ LOG(WARNING) << "Performing shell operation";
int err = SHFileOperation(&file_operation);
+ if (g_bug108724_debug)
+ LOG(WARNING) << "Done: " << err;
// Since we're passing flags to the operation telling it to be silent,
// it's possible for the operation to be aborted/cancelled without err
diff --git a/base/scoped_temp_dir.cc b/base/scoped_temp_dir.cc
index 6a51d6d..6af4d75 100644
--- a/base/scoped_temp_dir.cc
+++ b/base/scoped_temp_dir.cc
@@ -59,10 +59,13 @@ bool ScopedTempDir::Set(const FilePath& path) {
}
bool ScopedTempDir::Delete() {
+ LOG(WARNING) << "Deleting " << path_.LossyDisplayName() << " " << this;
if (path_.empty())
return false;
+ file_util::g_bug108724_debug = true;
bool ret = file_util::Delete(path_, true);
+ file_util::g_bug108724_debug = false;
if (ret) {
// We only clear the path if deleted the directory.
path_.clear();