summaryrefslogtreecommitdiffstats
path: root/chrome/common
diff options
context:
space:
mode:
authorshess@chromium.org <shess@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-11-08 20:04:48 +0000
committershess@chromium.org <shess@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-11-08 20:04:48 +0000
commit1bcea6d823e406bd37694c1f70e04cc72c2bbd28 (patch)
tree3bf09724b783b1054f8789d2319d3f81594bf2ad /chrome/common
parent38623ff26898ea65a5200f1cb4b063dd36d541cf (diff)
downloadchromium_src-1bcea6d823e406bd37694c1f70e04cc72c2bbd28.zip
chromium_src-1bcea6d823e406bd37694c1f70e04cc72c2bbd28.tar.gz
chromium_src-1bcea6d823e406bd37694c1f70e04cc72c2bbd28.tar.bz2
Pull back some CHECK calls which were removed.
Original CL http://codereview.chromium.org/8368018/ was sort of aggressive in some areas. I reveiewed it and this pulls back the cases I'm pretty sure should be kept. My basic approach was to keep things which would probably never happen in development, and which signal a problem which is unlikely to be transient. - important_file_writer.cc getting impossible amounts of data. - cfbundle_blocker.mm logs blocked bundles so user can see. - objc_zombie.mm crashes if the objc runtime is unexpectedly bizarre. - multi-process lock logs failure. I've actually seen that last before when a test nested a profile too deeply, in which case knowing the filename was the key hint. Review URL: http://codereview.chromium.org/8477018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@109080 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common')
-rw-r--r--chrome/common/important_file_writer.cc3
-rw-r--r--chrome/common/mac/cfbundle_blocker.mm14
-rw-r--r--chrome/common/multi_process_lock_linux.cc11
-rw-r--r--chrome/common/multi_process_lock_mac.cc7
-rw-r--r--chrome/common/multi_process_lock_win.cc7
5 files changed, 21 insertions, 21 deletions
diff --git a/chrome/common/important_file_writer.cc b/chrome/common/important_file_writer.cc
index c5e4cf8..bd02f87 100644
--- a/chrome/common/important_file_writer.cc
+++ b/chrome/common/important_file_writer.cc
@@ -50,7 +50,8 @@ class WriteToDiskTask : public Task {
return;
}
- DCHECK_LE(data_.length(), static_cast<size_t>(kint32max));
+ // If this happens in the wild something really bad is going on.
+ CHECK_LE(data_.length(), static_cast<size_t>(kint32max));
int bytes_written = base::WritePlatformFile(
tmp_file, 0, data_.data(), static_cast<int>(data_.length()));
base::FlushPlatformFile(tmp_file); // Ignore return value.
diff --git a/chrome/common/mac/cfbundle_blocker.mm b/chrome/common/mac/cfbundle_blocker.mm
index c4c29f2..3dbc34f 100644
--- a/chrome/common/mac/cfbundle_blocker.mm
+++ b/chrome/common/mac/cfbundle_blocker.mm
@@ -175,12 +175,14 @@ Boolean ChromeCFBundleLoadExecutableAndReturnError(CFBundleRef bundle,
NSString* bundle_id_print = bundle_id ? bundle_id : @"(nil)";
NSString* version_print = version ? version : @"(nil)";
- DLOG(INFO) << "Blocking attempt to load bundle "
- << [bundle_id_print UTF8String]
- << " version "
- << [version_print UTF8String]
- << " at "
- << [path fileSystemRepresentation];
+ // Provide a hint for the user (or module developer) to figure out
+ // that the bundle was blocked.
+ LOG(INFO) << "Blocking attempt to load bundle "
+ << [bundle_id_print UTF8String]
+ << " version "
+ << [version_print UTF8String]
+ << " at "
+ << [path fileSystemRepresentation];
if (error) {
base::mac::ScopedCFTypeRef<CFStringRef> app_bundle_id(
diff --git a/chrome/common/multi_process_lock_linux.cc b/chrome/common/multi_process_lock_linux.cc
index 0c7b25b..c5b70a4 100644
--- a/chrome/common/multi_process_lock_linux.cc
+++ b/chrome/common/multi_process_lock_linux.cc
@@ -30,9 +30,8 @@ class MultiProcessLockLinux : public MultiProcessLock {
}
if (name_.length() > MULTI_PROCESS_LOCK_NAME_MAX_LEN) {
- DLOG(ERROR) << "Socket name too long (" << name_.length()
- << " > " << MULTI_PROCESS_LOCK_NAME_MAX_LEN << ") - "
- << name_;
+ LOG(ERROR) << "Socket name too long (" << name_.length()
+ << " > " << MULTI_PROCESS_LOCK_NAME_MAX_LEN << ") - " << name_;
return false;
}
@@ -52,7 +51,7 @@ class MultiProcessLockLinux : public MultiProcessLock {
if (print_length < 0 ||
print_length > static_cast<int>(MULTI_PROCESS_LOCK_NAME_MAX_LEN)) {
- DPLOG(ERROR) << "Couldn't create sun_path - " << name_;
+ PLOG(ERROR) << "Couldn't create sun_path - " << name_;
return false;
}
@@ -68,7 +67,7 @@ class MultiProcessLockLinux : public MultiProcessLock {
int socket_fd = socket(AF_LOCAL, SOCK_STREAM, 0);
if (socket_fd < 0) {
- DPLOG(ERROR) << "Couldn't create socket - " << name_;
+ PLOG(ERROR) << "Couldn't create socket - " << name_;
return false;
}
@@ -82,7 +81,7 @@ class MultiProcessLockLinux : public MultiProcessLock {
<< &(address.sun_path[1])
<< " Length: " << length;
if (HANDLE_EINTR(close(socket_fd)) < 0) {
- DPLOG(ERROR) << "close";
+ PLOG(ERROR) << "close";
}
return false;
}
diff --git a/chrome/common/multi_process_lock_mac.cc b/chrome/common/multi_process_lock_mac.cc
index f036390..9a9cbe21 100644
--- a/chrome/common/multi_process_lock_mac.cc
+++ b/chrome/common/multi_process_lock_mac.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -25,9 +25,8 @@ class MultiProcessLockMac : public MultiProcessLock {
}
if (name_.length() > MULTI_PROCESS_LOCK_NAME_MAX_LEN) {
- DLOG(ERROR) << "Socket name too long (" << name_.length()
- << " > " << MULTI_PROCESS_LOCK_NAME_MAX_LEN << ") - "
- << name_;
+ LOG(ERROR) << "Socket name too long (" << name_.length()
+ << " > " << MULTI_PROCESS_LOCK_NAME_MAX_LEN << ") - " << name_;
return false;
}
diff --git a/chrome/common/multi_process_lock_win.cc b/chrome/common/multi_process_lock_win.cc
index 6ffcc92..b668f78 100644
--- a/chrome/common/multi_process_lock_win.cc
+++ b/chrome/common/multi_process_lock_win.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -25,9 +25,8 @@ class MultiProcessLockWin : public MultiProcessLock {
}
if (name_.length() > MULTI_PROCESS_LOCK_NAME_MAX_LEN) {
- DLOG(ERROR) << "Socket name too long (" << name_.length()
- << " > " << MULTI_PROCESS_LOCK_NAME_MAX_LEN << ") - "
- << name_;
+ LOG(ERROR) << "Socket name too long (" << name_.length()
+ << " > " << MULTI_PROCESS_LOCK_NAME_MAX_LEN << ") - " << name_;
return false;
}