summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chrome/common/extensions/extension.cc28
-rw-r--r--chrome/common/extensions/extension_file_util.cc22
-rw-r--r--chrome/common/extensions/extension_icon_set.cc6
-rw-r--r--chrome/common/extensions/extension_l10n_util.cc4
-rw-r--r--chrome/common/extensions/extension_messages.cc2
-rw-r--r--chrome/common/extensions/extension_permission_set.cc14
-rw-r--r--chrome/common/extensions/extension_unpacker.cc2
-rw-r--r--chrome/common/important_file_writer.cc10
-rw-r--r--chrome/common/json_pref_store.cc2
-rw-r--r--chrome/common/json_schema_validator.cc8
-rw-r--r--chrome/common/logging_chrome.cc20
-rw-r--r--chrome/common/mac/cfbundle_blocker.mm16
-rw-r--r--chrome/common/mac/launchd.mm4
-rw-r--r--chrome/common/mac/objc_zombie.mm6
-rw-r--r--chrome/common/mac/objc_zombie_unittest.mm2
-rw-r--r--chrome/common/metrics_helpers.cc6
-rw-r--r--chrome/common/metrics_log_manager.cc4
-rw-r--r--chrome/common/multi_process_lock_linux.cc19
-rw-r--r--chrome/common/multi_process_lock_mac.cc5
-rw-r--r--chrome/common/multi_process_lock_win.cc5
-rw-r--r--chrome/common/net/gaia/gaia_auth_fetcher.cc22
-rw-r--r--chrome/common/net/x509_certificate_model_nss.cc14
-rw-r--r--chrome/common/net/x509_certificate_model_openssl.cc8
-rw-r--r--chrome/common/service_process_util_linux.cc2
-rw-r--r--chrome/common/service_process_util_mac.mm38
-rw-r--r--chrome/common/service_process_util_posix.cc30
-rw-r--r--chrome/common/service_process_util_win.cc6
-rw-r--r--chrome/common/web_apps.cc8
-rw-r--r--chrome/common/zip.cc22
29 files changed, 169 insertions, 166 deletions
diff --git a/chrome/common/extensions/extension.cc b/chrome/common/extensions/extension.cc
index 52c10a0..ba5753c 100644
--- a/chrome/common/extensions/extension.cc
+++ b/chrome/common/extensions/extension.cc
@@ -282,11 +282,11 @@ Extension::Location Extension::GetHigherPriorityLocation(
void Extension::OverrideLaunchUrl(const GURL& override_url) {
GURL new_url(override_url);
if (!new_url.is_valid()) {
- LOG(WARNING) << "Invalid override url given for " << name();
+ DLOG(WARNING) << "Invalid override url given for " << name();
} else {
if (new_url.has_port()) {
- LOG(WARNING) << "Override URL passed for " << name()
- << " should not contain a port. Removing it.";
+ DLOG(WARNING) << "Override URL passed for " << name()
+ << " should not contain a port. Removing it.";
GURL::Replacements remove_port;
remove_port.ClearPort();
@@ -380,7 +380,7 @@ GURL Extension::GetResourceURL(const GURL& extension_url,
}
bool Extension::GenerateId(const std::string& input, std::string* output) {
- CHECK(output);
+ DCHECK(output);
uint8 hash[Extension::kIdSize];
crypto::SHA256HashString(input, hash, sizeof(hash));
*output = StringToLowerASCII(base::HexEncode(hash, sizeof(hash)));
@@ -1159,8 +1159,8 @@ bool Extension::LoadAppIsolation(const DictionaryValue* manifest,
if (isolation_string == values::kIsolatedStorage) {
is_storage_isolated_ = true;
} else {
- LOG(WARNING) << "Did not recognize isolation type: "
- << isolation_string;
+ DLOG(WARNING) << "Did not recognize isolation type: "
+ << isolation_string;
}
}
return true;
@@ -1334,7 +1334,7 @@ bool Extension::ParsePEMKeyBytes(const std::string& input,
}
bool Extension::ProducePEM(const std::string& input, std::string* output) {
- CHECK(output);
+ DCHECK(output);
if (input.length() == 0)
return false;
@@ -1344,7 +1344,7 @@ bool Extension::ProducePEM(const std::string& input, std::string* output) {
bool Extension::FormatPEMForFileOutput(const std::string& input,
std::string* output,
bool is_public) {
- CHECK(output);
+ DCHECK(output);
if (input.length() == 0)
return false;
*output = "";
@@ -1388,7 +1388,7 @@ void Extension::DecodeIconFromPath(const FilePath& icon_path,
std::string file_contents;
if (!file_util::ReadFileToString(icon_path, &file_contents)) {
- LOG(ERROR) << "Could not read icon file: " << icon_path.LossyDisplayName();
+ DLOG(ERROR) << "Could not read icon file: " << icon_path.LossyDisplayName();
return;
}
@@ -1399,15 +1399,15 @@ void Extension::DecodeIconFromPath(const FilePath& icon_path,
scoped_ptr<SkBitmap> decoded(new SkBitmap());
*decoded = decoder.Decode(data, file_contents.length());
if (decoded->empty()) {
- LOG(ERROR) << "Could not decode icon file: "
- << icon_path.LossyDisplayName();
+ DLOG(ERROR) << "Could not decode icon file: "
+ << icon_path.LossyDisplayName();
return;
}
if (decoded->width() != icon_size || decoded->height() != icon_size) {
- LOG(ERROR) << "Icon file has unexpected size: "
- << base::IntToString(decoded->width()) << "x"
- << base::IntToString(decoded->height());
+ DLOG(ERROR) << "Icon file has unexpected size: "
+ << base::IntToString(decoded->width()) << "x"
+ << base::IntToString(decoded->height());
return;
}
diff --git a/chrome/common/extensions/extension_file_util.cc b/chrome/common/extensions/extension_file_util.cc
index 3446f41..7fe9b5e 100644
--- a/chrome/common/extensions/extension_file_util.cc
+++ b/chrome/common/extensions/extension_file_util.cc
@@ -70,8 +70,8 @@ FilePath InstallExtension(const FilePath& unpacked_source_dir,
}
if (version_dir.empty()) {
- LOG(ERROR) << "Could not find a home for extension " << id << " with "
- << "version " << version << ".";
+ DLOG(ERROR) << "Could not find a home for extension " << id << " with "
+ << "version " << version << ".";
return FilePath();
}
@@ -314,7 +314,7 @@ void GarbageCollectExtensions(
if (!file_util::DirectoryExists(install_directory))
return;
- VLOG(1) << "Garbage collecting extensions...";
+ DVLOG(1) << "Garbage collecting extensions...";
file_util::FileEnumerator enumerator(install_directory,
false, // Not recursive.
file_util::FileEnumerator::DIRECTORIES);
@@ -332,10 +332,10 @@ void GarbageCollectExtensions(
// Delete directories that aren't valid IDs.
if (extension_id.empty()) {
- LOG(WARNING) << "Invalid extension ID encountered in extensions "
- "directory: " << basename.value();
- VLOG(1) << "Deleting invalid extension directory "
- << extension_path.value() << ".";
+ DLOG(WARNING) << "Invalid extension ID encountered in extensions "
+ "directory: " << basename.value();
+ DVLOG(1) << "Deleting invalid extension directory "
+ << extension_path.value() << ".";
file_util::Delete(extension_path, true); // Recursive.
continue;
}
@@ -347,8 +347,8 @@ void GarbageCollectExtensions(
// move on. This can legitimately happen when an uninstall does not
// complete, for example, when a plugin is in use at uninstall time.
if (iter == extension_paths.end()) {
- VLOG(1) << "Deleting unreferenced install for directory "
- << extension_path.LossyDisplayName() << ".";
+ DVLOG(1) << "Deleting unreferenced install for directory "
+ << extension_path.LossyDisplayName() << ".";
file_util::Delete(extension_path, true); // Recursive.
continue;
}
@@ -362,8 +362,8 @@ void GarbageCollectExtensions(
!version_dir.value().empty();
version_dir = versions_enumerator.Next()) {
if (version_dir.BaseName() != iter->second.BaseName()) {
- VLOG(1) << "Deleting old version for directory "
- << version_dir.LossyDisplayName() << ".";
+ DVLOG(1) << "Deleting old version for directory "
+ << version_dir.LossyDisplayName() << ".";
file_util::Delete(version_dir, true); // Recursive.
}
}
diff --git a/chrome/common/extensions/extension_icon_set.cc b/chrome/common/extensions/extension_icon_set.cc
index 9b47c7d..590abb0 100644
--- a/chrome/common/extensions/extension_icon_set.cc
+++ b/chrome/common/extensions/extension_icon_set.cc
@@ -15,7 +15,7 @@ void ExtensionIconSet::Clear() {
}
void ExtensionIconSet::Add(int size, const std::string& path) {
- CHECK(!path.empty() && path[0] != '/');
+ DCHECK(!path.empty() && path[0] != '/');
map_[size] = path;
}
@@ -36,7 +36,7 @@ std::string ExtensionIconSet::Get(int size, MatchType match_type) const {
}
return result == map_.rend() ? std::string() : result->second;
} else {
- CHECK(match_type == MATCH_BIGGER);
+ DCHECK(match_type == MATCH_BIGGER);
IconMap::const_iterator result = map_.end();
for (IconMap::const_iterator iter = map_.begin(); iter != map_.end();
++iter) {
@@ -53,7 +53,7 @@ bool ExtensionIconSet::ContainsPath(const std::string& path) const {
if (path.empty())
return false;
- CHECK(path[0] != '/') <<
+ DCHECK(path[0] != '/') <<
"ExtensionIconSet stores icon paths without leading slash.";
for (IconMap::const_iterator iter = map_.begin(); iter != map_.end();
diff --git a/chrome/common/extensions/extension_l10n_util.cc b/chrome/common/extensions/extension_l10n_util.cc
index a8ec5e6..b4e14b3 100644
--- a/chrome/common/extensions/extension_l10n_util.cc
+++ b/chrome/common/extensions/extension_l10n_util.cc
@@ -165,8 +165,8 @@ bool AddLocale(const std::set<std::string>& chrome_locales,
if (chrome_locales.find(locale_name) == chrome_locales.end()) {
// Warn if there is an extension locale that's not in the Chrome list,
// but don't fail.
- LOG(WARNING) << base::StringPrintf("Supplied locale %s is not supported.",
- locale_name.c_str());
+ DLOG(WARNING) << base::StringPrintf("Supplied locale %s is not supported.",
+ locale_name.c_str());
return true;
}
// Check if messages file is actually present (but don't check content).
diff --git a/chrome/common/extensions/extension_messages.cc b/chrome/common/extensions/extension_messages.cc
index 617ed64..7ebee77 100644
--- a/chrome/common/extensions/extension_messages.cc
+++ b/chrome/common/extensions/extension_messages.cc
@@ -64,7 +64,7 @@ scoped_refptr<Extension>
Extension::Create(path, location, *manifest, creation_flags,
&error));
if (!extension.get())
- LOG(ERROR) << "Error deserializing extension: " << error;
+ DLOG(ERROR) << "Error deserializing extension: " << error;
else
extension->SetActivePermissions(
new ExtensionPermissionSet(apis, explicit_hosts, scriptable_hosts));
diff --git a/chrome/common/extensions/extension_permission_set.cc b/chrome/common/extensions/extension_permission_set.cc
index f68b58e..9182d4a 100644
--- a/chrome/common/extensions/extension_permission_set.cc
+++ b/chrome/common/extensions/extension_permission_set.cc
@@ -84,7 +84,7 @@ const char kOldUnlimitedStoragePermission[] = "unlimited_storage";
const char kWindowsPermission[] = "windows";
void AddPatternsAndRemovePaths(const URLPatternSet& set, URLPatternSet* out) {
- CHECK(out);
+ DCHECK(out);
for (URLPatternSet::const_iterator i = set.begin(); i != set.end(); ++i) {
URLPattern p = *i;
p.SetPath("/*");
@@ -102,7 +102,7 @@ void AddPatternsAndRemovePaths(const URLPatternSet& set, URLPatternSet* out) {
ExtensionPermissionMessage ExtensionPermissionMessage::CreateFromHostList(
const std::set<std::string>& hosts) {
std::vector<std::string> host_list(hosts.begin(), hosts.end());
- CHECK_GT(host_list.size(), 0UL);
+ DCHECK_GT(host_list.size(), 0UL);
ID message_id;
string16 message;
@@ -355,8 +355,8 @@ ExtensionPermissionsInfo::ExtensionPermissionsInfo()
void ExtensionPermissionsInfo::RegisterAlias(
const char* name, const char* alias) {
- CHECK(name_map_.find(name) != name_map_.end());
- CHECK(name_map_.find(alias) == name_map_.end());
+ DCHECK(name_map_.find(name) != name_map_.end());
+ DCHECK(name_map_.find(alias) == name_map_.end());
name_map_[alias] = name_map_[name];
}
@@ -366,8 +366,8 @@ void ExtensionPermissionsInfo::RegisterPermission(
int l10n_message_id,
ExtensionPermissionMessage::ID message_id,
int flags) {
- CHECK(id_map_.find(id) == id_map_.end());
- CHECK(name_map_.find(name) == name_map_.end());
+ DCHECK(id_map_.find(id) == id_map_.end());
+ DCHECK(name_map_.find(name) == name_map_.end());
ExtensionAPIPermission* permission =
new ExtensionAPIPermission(id, name, l10n_message_id, message_id, flags);
@@ -392,7 +392,7 @@ ExtensionPermissionSet::ExtensionPermissionSet(
const ExtensionAPIPermissionSet& apis,
const URLPatternSet& explicit_hosts)
: apis_(apis) {
- CHECK(extension);
+ DCHECK(extension);
AddPatternsAndRemovePaths(explicit_hosts, &explicit_hosts_);
InitImplicitExtensionPermissions(extension);
InitEffectiveHosts();
diff --git a/chrome/common/extensions/extension_unpacker.cc b/chrome/common/extensions/extension_unpacker.cc
index 49104d0..3c729a4 100644
--- a/chrome/common/extensions/extension_unpacker.cc
+++ b/chrome/common/extensions/extension_unpacker.cc
@@ -144,7 +144,7 @@ bool ExtensionUnpacker::ReadAllMessageCatalogs(
}
bool ExtensionUnpacker::Run() {
- VLOG(1) << "Installing extension " << extension_path_.value();
+ DVLOG(1) << "Installing extension " << extension_path_.value();
// <profile>/Extensions/INSTALL_TEMP/<version>
temp_install_dir_ =
diff --git a/chrome/common/important_file_writer.cc b/chrome/common/important_file_writer.cc
index a1abd8d..c5e4cf8 100644
--- a/chrome/common/important_file_writer.cc
+++ b/chrome/common/important_file_writer.cc
@@ -50,7 +50,7 @@ class WriteToDiskTask : public Task {
return;
}
- CHECK_LE(data_.length(), static_cast<size_t>(kint32max));
+ DCHECK_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.
@@ -88,8 +88,8 @@ class WriteToDiskTask : public Task {
void LogFailure(TempFileFailure failure_code, const std::string& message) {
UMA_HISTOGRAM_ENUMERATION("ImportantFile.TempFileFailures", failure_code,
TEMP_FILE_FAILURE_MAX);
- PLOG(WARNING) << "temp file failure: " << path_.value()
- << " : " << message;
+ DPLOG(WARNING) << "temp file failure: " << path_.value()
+ << " : " << message;
}
const FilePath path_;
@@ -163,8 +163,8 @@ void ImportantFileWriter::DoScheduledWrite() {
if (serializer_->SerializeData(&data)) {
WriteNow(data);
} else {
- LOG(WARNING) << "failed to serialize data to be saved in "
- << path_.value();
+ DLOG(WARNING) << "failed to serialize data to be saved in "
+ << path_.value();
}
serializer_ = NULL;
}
diff --git a/chrome/common/json_pref_store.cc b/chrome/common/json_pref_store.cc
index 06c2028..4fe393a 100644
--- a/chrome/common/json_pref_store.cc
+++ b/chrome/common/json_pref_store.cc
@@ -96,7 +96,7 @@ void FileThreadDeserializer::HandleErrors(
PersistentPrefStore::PrefReadError* error) {
*error = PersistentPrefStore::PREF_READ_ERROR_NONE;
if (!value) {
- VLOG(1) << "Error while loading JSON file: " << error_msg;
+ DVLOG(1) << "Error while loading JSON file: " << error_msg;
switch (error_code) {
case JSONFileValueSerializer::JSON_ACCESS_DENIED:
*error = PersistentPrefStore::PREF_READ_ERROR_ACCESS_DENIED;
diff --git a/chrome/common/json_schema_validator.cc b/chrome/common/json_schema_validator.cc
index 0662fcf..ccb649b 100644
--- a/chrome/common/json_schema_validator.cc
+++ b/chrome/common/json_schema_validator.cc
@@ -93,7 +93,7 @@ std::string JSONSchemaValidator::GetJSONSchemaType(Value* value) {
case Value::TYPE_LIST:
return "array";
default:
- CHECK(false) << "Unexpected value type: " << value->GetType();
+ NOTREACHED() << "Unexpected value type: " << value->GetType();
return "";
}
}
@@ -156,7 +156,7 @@ void JSONSchemaValidator::Validate(Value* instance,
if (iter == types_.end())
types_[id] = schema;
else
- CHECK(iter->second == schema);
+ DCHECK(iter->second == schema);
}
// If the schema has a $ref property, the instance must validate against
@@ -206,7 +206,7 @@ void JSONSchemaValidator::Validate(Value* instance,
else if (type == "number" || type == "integer")
ValidateNumber(instance, schema, path);
else if (type != "boolean" && type != "null")
- CHECK(false) << "Unexpected type: " << type;
+ NOTREACHED() << "Unexpected type: " << type;
}
}
@@ -257,7 +257,7 @@ void JSONSchemaValidator::ValidateEnum(Value* instance,
break;
default:
- CHECK(false) << "Unexpected type in enum: " << choice->GetType();
+ NOTREACHED() << "Unexpected type in enum: " << choice->GetType();
}
}
diff --git a/chrome/common/logging_chrome.cc b/chrome/common/logging_chrome.cc
index 0b7f726..958d464 100644
--- a/chrome/common/logging_chrome.cc
+++ b/chrome/common/logging_chrome.cc
@@ -187,15 +187,15 @@ FilePath SetUpSymlinkIfNeeded(const FilePath& symlink_path, bool new_log) {
// We don't care if the unlink fails; we're going to continue anyway.
if (::unlink(symlink_path.value().c_str()) == -1) {
if (symlink_exists) // only warn if we might expect it to succeed.
- PLOG(WARNING) << "Unable to unlink " << symlink_path.value();
+ DPLOG(WARNING) << "Unable to unlink " << symlink_path.value();
}
if (!file_util::CreateSymbolicLink(target_path, symlink_path)) {
- PLOG(ERROR) << "Unable to create symlink " << symlink_path.value()
- << " pointing at " << target_path.value();
+ DPLOG(ERROR) << "Unable to create symlink " << symlink_path.value()
+ << " pointing at " << target_path.value();
}
} else {
if (!file_util::ReadSymbolicLink(symlink_path, &target_path))
- PLOG(ERROR) << "Unable to read symlink " << symlink_path.value();
+ DPLOG(ERROR) << "Unable to read symlink " << symlink_path.value();
}
return target_path;
}
@@ -203,9 +203,9 @@ FilePath SetUpSymlinkIfNeeded(const FilePath& symlink_path, bool new_log) {
void RemoveSymlinkAndLog(const FilePath& link_path,
const FilePath& target_path) {
if (::unlink(link_path.value().c_str()) == -1)
- PLOG(WARNING) << "Unable to unlink symlink " << link_path.value();
+ DPLOG(WARNING) << "Unable to unlink symlink " << link_path.value();
if (::unlink(target_path.value().c_str()) == -1)
- PLOG(WARNING) << "Unable to unlink log file " << target_path.value();
+ DPLOG(WARNING) << "Unable to unlink log file " << target_path.value();
}
} // anonymous namespace
@@ -252,7 +252,7 @@ void RedirectChromeLogging(const CommandLine& command_line) {
logging::LOCK_LOG_FILE,
logging::APPEND_TO_OLD_LOG_FILE,
dcheck_state)) {
- LOG(ERROR) << "Unable to initialize logging to " << log_path.value();
+ DLOG(ERROR) << "Unable to initialize logging to " << log_path.value();
RemoveSymlinkAndLog(log_path, target_path);
} else {
chrome_logging_redirected_ = true;
@@ -314,7 +314,7 @@ void InitChromeLogging(const CommandLine& command_line,
#if defined(OS_CHROMEOS)
if (!success) {
- PLOG(ERROR) << "Unable to initialize logging to " << log_path.value()
+ DPLOG(ERROR) << "Unable to initialize logging to " << log_path.value()
<< " (which should be a link to " << target_path.value() << ")";
RemoveSymlinkAndLog(log_path, target_path);
chrome_logging_failed_ = true;
@@ -322,7 +322,7 @@ void InitChromeLogging(const CommandLine& command_line,
}
#else
if (!success) {
- PLOG(ERROR) << "Unable to initialize logging to " << log_path.value();
+ DPLOG(ERROR) << "Unable to initialize logging to " << log_path.value();
chrome_logging_failed_ = true;
return;
}
@@ -357,7 +357,7 @@ void InitChromeLogging(const CommandLine& command_line,
level >= 0 && level < LOG_NUM_SEVERITIES) {
logging::SetMinLogLevel(level);
} else {
- LOG(WARNING) << "Bad log level: " << log_level;
+ DLOG(WARNING) << "Bad log level: " << log_level;
}
}
diff --git a/chrome/common/mac/cfbundle_blocker.mm b/chrome/common/mac/cfbundle_blocker.mm
index ab2ada6..c4c29f2 100644
--- a/chrome/common/mac/cfbundle_blocker.mm
+++ b/chrome/common/mac/cfbundle_blocker.mm
@@ -175,12 +175,12 @@ Boolean ChromeCFBundleLoadExecutableAndReturnError(CFBundleRef bundle,
NSString* bundle_id_print = bundle_id ? bundle_id : @"(nil)";
NSString* version_print = version ? version : @"(nil)";
- LOG(INFO) << "Blocking attempt to load bundle "
- << [bundle_id_print UTF8String]
- << " version "
- << [version_print UTF8String]
- << " at "
- << [path fileSystemRepresentation];
+ DLOG(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(
@@ -229,8 +229,8 @@ void EnableCFBundleBlocker() {
reinterpret_cast<void**>(
&g_original_underscore_cfbundle_load_executable_and_return_error));
if (err != err_none) {
- LOG(WARNING) << "mach_override _CFBundleLoadExecutableAndReturnError: "
- << err;
+ DLOG(WARNING) << "mach_override _CFBundleLoadExecutableAndReturnError: "
+ << err;
}
}
diff --git a/chrome/common/mac/launchd.mm b/chrome/common/mac/launchd.mm
index 8bad675..5abaaa2 100644
--- a/chrome/common/mac/launchd.mm
+++ b/chrome/common/mac/launchd.mm
@@ -44,7 +44,7 @@ NSURL* GetPlistURL(Launchd::Domain domain,
withIntermediateDirectories:YES
attributes:nil
error:&err]) {
- LOG(ERROR) << "GetPlistURL " << base::mac::NSToCFCast(err);
+ DLOG(ERROR) << "GetPlistURL " << base::mac::NSToCFCast(err);
return nil;
}
@@ -161,7 +161,7 @@ bool Launchd::DeletePlist(Domain domain, Type type, CFStringRef name) {
if (![[NSFileManager defaultManager] removeItemAtPath:[ns_url path]
error:&err]) {
if ([err code] != NSFileNoSuchFileError) {
- LOG(ERROR) << "DeletePlist: " << base::mac::NSToCFCast(err);
+ DLOG(ERROR) << "DeletePlist: " << base::mac::NSToCFCast(err);
}
return false;
}
diff --git a/chrome/common/mac/objc_zombie.mm b/chrome/common/mac/objc_zombie.mm
index 3e9ce8a..452aa6f 100644
--- a/chrome/common/mac/objc_zombie.mm
+++ b/chrome/common/mac/objc_zombie.mm
@@ -450,7 +450,7 @@ bool ZombieEnable(bool zombieAllObjects,
size_t zombieCount) {
// Only allow enable/disable on the main thread, just to keep things
// simple.
- CHECK([NSThread isMainThread]);
+ DCHECK([NSThread isMainThread]);
if (!ZombieInit())
return false;
@@ -527,7 +527,7 @@ bool ZombieEnable(bool zombieAllObjects,
void ZombieDisable() {
// Only allow enable/disable on the main thread, just to keep things
// simple.
- CHECK([NSThread isMainThread]);
+ DCHECK([NSThread isMainThread]);
// |ZombieInit()| was never called.
if (!g_originalDeallocIMP)
@@ -535,7 +535,7 @@ void ZombieDisable() {
// Put back the original implementation of -[NSObject dealloc].
Method m = class_getInstanceMethod([NSObject class], @selector(dealloc));
- CHECK(m);
+ DCHECK(m);
method_setImplementation(m, g_originalDeallocIMP);
// Can safely grab this because it only happens on the main thread.
diff --git a/chrome/common/mac/objc_zombie_unittest.mm b/chrome/common/mac/objc_zombie_unittest.mm
index df91d53..39d2ff13 100644
--- a/chrome/common/mac/objc_zombie_unittest.mm
+++ b/chrome/common/mac/objc_zombie_unittest.mm
@@ -107,7 +107,7 @@ TEST(ObjcZombieTest, CxxDestructors) {
// the 10.5 version in |ZombieInit()|, and run this test on 10.6.
TEST(ObjcZombieTest, AssociatedObjectsReleased) {
if (![ZombieAssociatedObjectTest supportsAssociatedObjects]) {
- LOG(ERROR)
+ DLOG(ERROR)
<< "ObjcZombieTest.AssociatedObjectsReleased not supported on 10.5";
return;
}
diff --git a/chrome/common/metrics_helpers.cc b/chrome/common/metrics_helpers.cc
index 36ff5d1..3a012fe 100644
--- a/chrome/common/metrics_helpers.cc
+++ b/chrome/common/metrics_helpers.cc
@@ -47,7 +47,7 @@ class MetricsLogBase::XmlWrapper {
buffer_(NULL),
writer_(NULL) {
buffer_ = xmlBufferCreate();
- CHECK(buffer_);
+ DCHECK(buffer_);
#if defined(OS_CHROMEOS)
writer_ = xmlNewTextWriterDoc(&doc_, /* compression */ 0);
@@ -197,8 +197,8 @@ std::string MetricsLogBase::CreateHash(const std::string& value) {
// name. We can then use this logging to find out what histogram name was
// being hashed to a given MD5 value by just running the version of Chromium
// in question with --enable-logging.
- VLOG(1) << "Metrics: Hash numeric [" << value
- << "]=[" << reverse_uint64 << "]";
+ DVLOG(1) << "Metrics: Hash numeric [" << value
+ << "]=[" << reverse_uint64 << "]";
return std::string(reinterpret_cast<char*>(digest.a), arraysize(digest.a));
}
diff --git a/chrome/common/metrics_log_manager.cc b/chrome/common/metrics_log_manager.cc
index 572e62a..cedd7bc 100644
--- a/chrome/common/metrics_log_manager.cc
+++ b/chrome/common/metrics_log_manager.cc
@@ -112,9 +112,9 @@ void MetricsLogManager::CompressStagedLog() {
bool success = Bzip2Compress(staged_log_text, &compressed_staged_log_text_);
if (success) {
// Allow security-conscious users to see all metrics logs that we send.
- VLOG(1) << "METRICS LOG: " << staged_log_text;
+ DVLOG(1) << "METRICS LOG: " << staged_log_text;
} else {
- LOG(DFATAL) << "Failed to compress log for transmission.";
+ NOTREACHED() << "Failed to compress log for transmission.";
}
}
diff --git a/chrome/common/multi_process_lock_linux.cc b/chrome/common/multi_process_lock_linux.cc
index 6452e91..0c7b25b 100644
--- a/chrome/common/multi_process_lock_linux.cc
+++ b/chrome/common/multi_process_lock_linux.cc
@@ -30,8 +30,9 @@ class MultiProcessLockLinux : public MultiProcessLock {
}
if (name_.length() > MULTI_PROCESS_LOCK_NAME_MAX_LEN) {
- LOG(ERROR) << "Socket name too long (" << name_.length()
- << " > " << MULTI_PROCESS_LOCK_NAME_MAX_LEN << ") - " << name_;
+ DLOG(ERROR) << "Socket name too long (" << name_.length()
+ << " > " << MULTI_PROCESS_LOCK_NAME_MAX_LEN << ") - "
+ << name_;
return false;
}
@@ -51,7 +52,7 @@ class MultiProcessLockLinux : public MultiProcessLock {
if (print_length < 0 ||
print_length > static_cast<int>(MULTI_PROCESS_LOCK_NAME_MAX_LEN)) {
- PLOG(ERROR) << "Couldn't create sun_path - " << name_;
+ DPLOG(ERROR) << "Couldn't create sun_path - " << name_;
return false;
}
@@ -67,7 +68,7 @@ class MultiProcessLockLinux : public MultiProcessLock {
int socket_fd = socket(AF_LOCAL, SOCK_STREAM, 0);
if (socket_fd < 0) {
- PLOG(ERROR) << "Couldn't create socket - " << name_;
+ DPLOG(ERROR) << "Couldn't create socket - " << name_;
return false;
}
@@ -77,11 +78,11 @@ class MultiProcessLockLinux : public MultiProcessLock {
fd_ = socket_fd;
return true;
} else {
- VLOG(1) << "Couldn't bind socket - "
- << &(address.sun_path[1])
- << " Length: " << length;
+ DVLOG(1) << "Couldn't bind socket - "
+ << &(address.sun_path[1])
+ << " Length: " << length;
if (HANDLE_EINTR(close(socket_fd)) < 0) {
- PLOG(ERROR) << "close";
+ DPLOG(ERROR) << "close";
}
return false;
}
@@ -93,7 +94,7 @@ class MultiProcessLockLinux : public MultiProcessLock {
return;
}
if (HANDLE_EINTR(close(fd_)) < 0) {
- PLOG(ERROR) << "close";
+ DPLOG(ERROR) << "close";
}
fd_ = -1;
}
diff --git a/chrome/common/multi_process_lock_mac.cc b/chrome/common/multi_process_lock_mac.cc
index dfeb2f6..f036390 100644
--- a/chrome/common/multi_process_lock_mac.cc
+++ b/chrome/common/multi_process_lock_mac.cc
@@ -25,8 +25,9 @@ class MultiProcessLockMac : public MultiProcessLock {
}
if (name_.length() > MULTI_PROCESS_LOCK_NAME_MAX_LEN) {
- LOG(ERROR) << "Socket name too long (" << name_.length()
- << " > " << MULTI_PROCESS_LOCK_NAME_MAX_LEN << ") - " << name_;
+ DLOG(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 ea31da6b..6ffcc92 100644
--- a/chrome/common/multi_process_lock_win.cc
+++ b/chrome/common/multi_process_lock_win.cc
@@ -25,8 +25,9 @@ class MultiProcessLockWin : public MultiProcessLock {
}
if (name_.length() > MULTI_PROCESS_LOCK_NAME_MAX_LEN) {
- LOG(ERROR) << "Socket name too long (" << name_.length()
- << " > " << MULTI_PROCESS_LOCK_NAME_MAX_LEN << ") - " << name_;
+ DLOG(ERROR) << "Socket name too long (" << name_.length()
+ << " > " << MULTI_PROCESS_LOCK_NAME_MAX_LEN << ") - "
+ << name_;
return false;
}
diff --git a/chrome/common/net/gaia/gaia_auth_fetcher.cc b/chrome/common/net/gaia/gaia_auth_fetcher.cc
index d550de1..7e79a0d 100644
--- a/chrome/common/net/gaia/gaia_auth_fetcher.cc
+++ b/chrome/common/net/gaia/gaia_auth_fetcher.cc
@@ -301,7 +301,7 @@ void GaiaAuthFetcher::StartClientLogin(
// This class is thread agnostic, so be sure to call this only on the
// same thread each time.
- VLOG(1) << "Starting new ClientLogin fetch for:" << username;
+ DVLOG(1) << "Starting new ClientLogin fetch for:" << username;
// Must outlive fetcher_.
request_body_ = MakeClientLoginBody(username,
@@ -325,7 +325,7 @@ void GaiaAuthFetcher::StartIssueAuthToken(const std::string& sid,
const char* const service) {
DCHECK(!fetch_pending_) << "Tried to fetch two things at once!";
- VLOG(1) << "Starting IssueAuthToken for: " << service;
+ DVLOG(1) << "Starting IssueAuthToken for: " << service;
requested_service_ = service;
request_body_ = MakeIssueAuthTokenBody(sid, lsid, service);
fetcher_.reset(CreateGaiaFetcher(getter_,
@@ -341,7 +341,7 @@ void GaiaAuthFetcher::StartGetUserInfo(const std::string& lsid,
const std::string& info_key) {
DCHECK(!fetch_pending_) << "Tried to fetch two things at once!";
- VLOG(1) << "Starting GetUserInfo for lsid=" << lsid;
+ DVLOG(1) << "Starting GetUserInfo for lsid=" << lsid;
request_body_ = MakeGetUserInfoBody(lsid);
fetcher_.reset(CreateGaiaFetcher(getter_,
request_body_,
@@ -356,7 +356,7 @@ void GaiaAuthFetcher::StartGetUserInfo(const std::string& lsid,
void GaiaAuthFetcher::StartTokenAuth(const std::string& auth_token) {
DCHECK(!fetch_pending_) << "Tried to fetch two things at once!";
- VLOG(1) << "Starting TokenAuth with auth_token=" << auth_token;
+ DVLOG(1) << "Starting TokenAuth with auth_token=" << auth_token;
// The continue URL is a required parameter of the TokenAuth API, but in this
// case we don't actually need or want to navigate to it. Setting it to
@@ -375,7 +375,7 @@ void GaiaAuthFetcher::StartTokenAuth(const std::string& auth_token) {
void GaiaAuthFetcher::StartMergeSession(const std::string& auth_token) {
DCHECK(!fetch_pending_) << "Tried to fetch two things at once!";
- VLOG(1) << "Starting MergeSession with auth_token=" << auth_token;
+ DVLOG(1) << "Starting MergeSession with auth_token=" << auth_token;
// The continue URL is a required parameter of the MergeSession API, but in
// this case we don't actually need or want to navigate to it. Setting it to
@@ -404,7 +404,7 @@ GoogleServiceAuthError GaiaAuthFetcher::GenerateAuthError(
if (status.status() == net::URLRequestStatus::CANCELED) {
return GoogleServiceAuthError(GoogleServiceAuthError::REQUEST_CANCELED);
} else {
- LOG(WARNING) << "Could not reach Google Accounts servers: errno "
+ DLOG(WARNING) << "Could not reach Google Accounts servers: errno "
<< status.error();
return GoogleServiceAuthError::FromConnectionError(status.error());
}
@@ -418,7 +418,7 @@ GoogleServiceAuthError GaiaAuthFetcher::GenerateAuthError(
std::string captcha_url;
std::string captcha_token;
ParseClientLoginFailure(data, &error, &url, &captcha_url, &captcha_token);
- LOG(WARNING) << "ClientLogin failed with " << error;
+ DLOG(WARNING) << "ClientLogin failed with " << error;
if (error == kCaptchaError) {
GURL image_url(
@@ -440,7 +440,7 @@ GoogleServiceAuthError GaiaAuthFetcher::GenerateAuthError(
GoogleServiceAuthError::SERVICE_UNAVAILABLE);
}
- LOG(WARNING) << "Incomprehensible response from Google Accounts servers.";
+ DLOG(WARNING) << "Incomprehensible response from Google Accounts servers.";
return GoogleServiceAuthError(
GoogleServiceAuthError::SERVICE_UNAVAILABLE);
}
@@ -457,7 +457,7 @@ GoogleServiceAuthError GaiaAuthFetcher::GenerateOAuthLoginError(
if (status.status() == net::URLRequestStatus::CANCELED) {
return GoogleServiceAuthError(GoogleServiceAuthError::REQUEST_CANCELED);
} else {
- LOG(WARNING) << "Could not reach Google Accounts servers: errno "
+ DLOG(WARNING) << "Could not reach Google Accounts servers: errno "
<< status.error();
return GoogleServiceAuthError::FromConnectionError(status.error());
}
@@ -493,7 +493,7 @@ GoogleServiceAuthError GaiaAuthFetcher::GenerateOAuthLoginError(
GoogleServiceAuthError::SERVICE_UNAVAILABLE);
}
- LOG(WARNING) << "Incomprehensible response from Google Accounts servers.";
+ DLOG(WARNING) << "Incomprehensible response from Google Accounts servers.";
return GoogleServiceAuthError(
GoogleServiceAuthError::SERVICE_UNAVAILABLE);
}
@@ -506,7 +506,7 @@ void GaiaAuthFetcher::OnClientLoginFetched(const std::string& data,
const net::URLRequestStatus& status,
int response_code) {
if (status.is_success() && response_code == RC_REQUEST_OK) {
- VLOG(1) << "ClientLogin successful!";
+ DVLOG(1) << "ClientLogin successful!";
std::string sid;
std::string lsid;
std::string token;
diff --git a/chrome/common/net/x509_certificate_model_nss.cc b/chrome/common/net/x509_certificate_model_nss.cc
index 698dcc2..b0dd0db 100644
--- a/chrome/common/net/x509_certificate_model_nss.cc
+++ b/chrome/common/net/x509_certificate_model_nss.cc
@@ -332,23 +332,23 @@ string GetDerString(X509Certificate::OSCertHandle cert_handle) {
string GetCMSString(const X509Certificate::OSCertHandles& cert_chain,
size_t start, size_t end) {
ScopedPRArenaPool arena(PORT_NewArena(1024));
- CHECK(arena.get());
+ DCHECK(arena.get());
ScopedNSSCMSMessage message(NSS_CMSMessage_Create(arena.get()));
- CHECK(message.get());
+ DCHECK(message.get());
// First, create SignedData with the certificate only (no chain).
ScopedNSSCMSSignedData signed_data(NSS_CMSSignedData_CreateCertsOnly(
message.get(), cert_chain[start], PR_FALSE));
if (!signed_data.get()) {
- LOG(ERROR) << "NSS_CMSSignedData_Create failed";
+ DLOG(ERROR) << "NSS_CMSSignedData_Create failed";
return "";
}
// Add the rest of the chain (if any).
for (size_t i = start + 1; i < end; ++i) {
if (NSS_CMSSignedData_AddCertificate(signed_data.get(), cert_chain[i]) !=
SECSuccess) {
- LOG(ERROR) << "NSS_CMSSignedData_AddCertificate failed on " << i;
+ DLOG(ERROR) << "NSS_CMSSignedData_AddCertificate failed on " << i;
return "";
}
}
@@ -358,7 +358,7 @@ string GetCMSString(const X509Certificate::OSCertHandles& cert_chain,
message.get(), cinfo, signed_data.get()) == SECSuccess) {
ignore_result(signed_data.release());
} else {
- LOG(ERROR) << "NSS_CMSMessage_GetContentInfo failed";
+ DLOG(ERROR) << "NSS_CMSMessage_GetContentInfo failed";
return "";
}
@@ -368,12 +368,12 @@ string GetCMSString(const X509Certificate::OSCertHandles& cert_chain,
NULL, NULL, NULL, NULL,
NULL);
if (!ecx) {
- LOG(ERROR) << "NSS_CMSEncoder_Start failed";
+ DLOG(ERROR) << "NSS_CMSEncoder_Start failed";
return "";
}
if (NSS_CMSEncoder_Finish(ecx) != SECSuccess) {
- LOG(ERROR) << "NSS_CMSEncoder_Finish failed";
+ DLOG(ERROR) << "NSS_CMSEncoder_Finish failed";
return "";
}
diff --git a/chrome/common/net/x509_certificate_model_openssl.cc b/chrome/common/net/x509_certificate_model_openssl.cc
index 0ea6e02..114a242 100644
--- a/chrome/common/net/x509_certificate_model_openssl.cc
+++ b/chrome/common/net/x509_certificate_model_openssl.cc
@@ -197,8 +197,8 @@ std::string HashCertSHA256(net::X509Certificate::OSCertHandle cert_handle) {
unsigned char sha256_data[SHA256_DIGEST_LENGTH] = {0};
unsigned int sha256_size = sizeof(sha256_data);
int ret = X509_digest(cert_handle, EVP_sha256(), sha256_data, &sha256_size);
- CHECK(ret);
- CHECK_EQ(sha256_size, sizeof(sha256_data));
+ DCHECK(ret);
+ DCHECK_EQ(sha256_size, sizeof(sha256_data));
return ProcessRawBytes(sha256_data, sha256_size);
}
@@ -206,8 +206,8 @@ std::string HashCertSHA1(net::X509Certificate::OSCertHandle cert_handle) {
unsigned char sha1_data[SHA_DIGEST_LENGTH] = {0};
unsigned int sha1_size = sizeof(sha1_data);
int ret = X509_digest(cert_handle, EVP_sha1(), sha1_data, &sha1_size);
- CHECK(ret);
- CHECK_EQ(sha1_size, sizeof(sha1_data));
+ DCHECK(ret);
+ DCHECK_EQ(sha1_size, sizeof(sha1_data));
return ProcessRawBytes(sha1_data, sha1_size);
}
diff --git a/chrome/common/service_process_util_linux.cc b/chrome/common/service_process_util_linux.cc
index ab5957e..457a50c 100644
--- a/chrome/common/service_process_util_linux.cc
+++ b/chrome/common/service_process_util_linux.cc
@@ -63,7 +63,7 @@ MultiProcessLock* TakeServiceRunningLock(bool waiting) {
bool ForceServiceProcessShutdown(const std::string& version,
base::ProcessId process_id) {
if (kill(process_id, SIGTERM) < 0) {
- PLOG(ERROR) << "kill";
+ DPLOG(ERROR) << "kill";
return false;
}
return true;
diff --git a/chrome/common/service_process_util_mac.mm b/chrome/common/service_process_util_mac.mm
index c92f6c0..383f26f 100644
--- a/chrome/common/service_process_util_mac.mm
+++ b/chrome/common/service_process_util_mac.mm
@@ -116,8 +116,8 @@ bool ForceServiceProcessShutdown(const std::string& /* version */,
CFErrorRef err = NULL;
bool ret = Launchd::GetInstance()->RemoveJob(label, &err);
if (!ret) {
- LOG(ERROR) << "ForceServiceProcessShutdown: " << err << " "
- << base::SysCFStringRefToUTF8(label);
+ DLOG(ERROR) << "ForceServiceProcessShutdown: " << err << " "
+ << base::SysCFStringRefToUTF8(label);
CFRelease(err);
}
return ret;
@@ -147,17 +147,17 @@ bool GetServiceProcessData(std::string* version, base::ProcessId* pid) {
if (ns_version) {
*version = base::SysNSStringToUTF8(ns_version);
} else {
- LOG(ERROR) << "Unable to get version at: "
- << reinterpret_cast<CFStringRef>(bundle_path);
+ DLOG(ERROR) << "Unable to get version at: "
+ << reinterpret_cast<CFStringRef>(bundle_path);
}
} else {
// The bundle has been deleted out from underneath the registered
// job.
- LOG(ERROR) << "Unable to get bundle at: "
- << reinterpret_cast<CFStringRef>(bundle_path);
+ DLOG(ERROR) << "Unable to get bundle at: "
+ << reinterpret_cast<CFStringRef>(bundle_path);
}
} else {
- LOG(ERROR) << "Unable to get executable path for service process";
+ DLOG(ERROR) << "Unable to get executable path for service process";
}
}
if (pid) {
@@ -175,8 +175,8 @@ bool ServiceProcessState::Initialize() {
CFDictionaryRef dict =
Launchd::GetInstance()->CopyDictionaryByCheckingIn(&err);
if (!dict) {
- LOG(ERROR) << "ServiceProcess must be launched by launchd. "
- << "CopyLaunchdDictionaryByCheckingIn: " << err;
+ DLOG(ERROR) << "ServiceProcess must be launched by launchd. "
+ << "CopyLaunchdDictionaryByCheckingIn: " << err;
CFRelease(err);
return false;
}
@@ -185,13 +185,13 @@ bool ServiceProcessState::Initialize() {
}
IPC::ChannelHandle ServiceProcessState::GetServiceProcessChannel() {
- CHECK(state_);
+ DCHECK(state_);
NSDictionary *ns_launchd_conf = base::mac::CFToNSCast(state_->launchd_conf_);
NSDictionary* socket_dict =
[ns_launchd_conf objectForKey:@ LAUNCH_JOBKEY_SOCKETS];
NSArray* sockets =
[socket_dict objectForKey:GetServiceProcessLaunchDSocketKey()];
- CHECK_EQ([sockets count], 1U);
+ DCHECK_EQ([sockets count], 1U);
int socket = [[sockets objectAtIndex:0] intValue];
base::FileDescriptor fd(socket, false);
return IPC::ChannelHandle(std::string(), fd);
@@ -313,7 +313,7 @@ bool ServiceProcessState::StateData::WatchExecutable() {
NSDictionary* ns_launchd_conf = base::mac::CFToNSCast(launchd_conf_);
NSString* exe_path = [ns_launchd_conf objectForKey:@ LAUNCH_JOBKEY_PROGRAM];
if (!exe_path) {
- LOG(ERROR) << "No " LAUNCH_JOBKEY_PROGRAM;
+ DLOG(ERROR) << "No " LAUNCH_JOBKEY_PROGRAM;
return false;
}
@@ -321,11 +321,11 @@ bool ServiceProcessState::StateData::WatchExecutable() {
scoped_ptr<ExecFilePathWatcherDelegate> delegate(
new ExecFilePathWatcherDelegate);
if (!delegate->Init(executable_path)) {
- LOG(ERROR) << "executable_watcher_.Init " << executable_path.value();
+ DLOG(ERROR) << "executable_watcher_.Init " << executable_path.value();
return false;
}
if (!executable_watcher_.Watch(executable_path, delegate.release())) {
- LOG(ERROR) << "executable_watcher_.watch " << executable_path.value();
+ DLOG(ERROR) << "executable_watcher_.watch " << executable_path.value();
return false;
}
return true;
@@ -404,17 +404,17 @@ void ExecFilePathWatcherDelegate::OnFilePathChanged(const FilePath& path) {
Launchd::Agent,
name,
plist)) {
- LOG(ERROR) << "Unable to rewrite plist.";
+ DLOG(ERROR) << "Unable to rewrite plist.";
needs_shutdown = true;
}
} else {
- LOG(ERROR) << "Unable to read plist.";
+ DLOG(ERROR) << "Unable to read plist.";
needs_shutdown = true;
}
}
if (needs_shutdown) {
if (!RemoveFromLaunchd()) {
- LOG(ERROR) << "Unable to RemoveFromLaunchd.";
+ DLOG(ERROR) << "Unable to RemoveFromLaunchd.";
}
}
@@ -425,7 +425,7 @@ void ExecFilePathWatcherDelegate::OnFilePathChanged(const FilePath& path) {
Launchd::Agent,
name,
session_type)) {
- LOG(ERROR) << "RestartLaunchdJob";
+ DLOG(ERROR) << "RestartLaunchdJob";
needs_shutdown = true;
}
}
@@ -435,7 +435,7 @@ void ExecFilePathWatcherDelegate::OnFilePathChanged(const FilePath& path) {
CFErrorRef err = NULL;
if (!Launchd::GetInstance()->RemoveJob(label, &err)) {
base::mac::ScopedCFTypeRef<CFErrorRef> scoped_err(err);
- LOG(ERROR) << "RemoveJob " << err;
+ DLOG(ERROR) << "RemoveJob " << err;
// Exiting with zero, so launchd doesn't restart the process.
exit(0);
}
diff --git a/chrome/common/service_process_util_posix.cc b/chrome/common/service_process_util_posix.cc
index 9f6fd60..41780f8 100644
--- a/chrome/common/service_process_util_posix.cc
+++ b/chrome/common/service_process_util_posix.cc
@@ -29,11 +29,11 @@ void ServiceProcessTerminateMonitor::OnFileCanReadWithoutBlocking(int fd) {
terminate_task_->Run();
terminate_task_.reset();
} else if (length > 0) {
- LOG(ERROR) << "Unexpected read: " << buffer;
+ DLOG(ERROR) << "Unexpected read: " << buffer;
} else if (length == 0) {
- LOG(ERROR) << "Unexpected fd close";
+ DLOG(ERROR) << "Unexpected fd close";
} else if (length < 0) {
- PLOG(ERROR) << "read";
+ DPLOG(ERROR) << "read";
}
}
}
@@ -50,7 +50,7 @@ static void SigTermHandler(int sig, siginfo_t* info, void* uap) {
// down by an appropriate process.
int message = ServiceProcessTerminateMonitor::kTerminateMessage;
if (write(g_signal_socket, &message, sizeof(message)) < 0) {
- PLOG(ERROR) << "write";
+ DPLOG(ERROR) << "write";
}
}
@@ -61,13 +61,13 @@ ServiceProcessState::StateData::StateData() : set_action_(false) {
void ServiceProcessState::StateData::SignalReady(base::WaitableEvent* signal,
bool* success) {
- CHECK_EQ(g_signal_socket, -1);
- CHECK(!signal->IsSignaled());
+ DCHECK_EQ(g_signal_socket, -1);
+ DCHECK(!signal->IsSignaled());
*success = MessageLoopForIO::current()->WatchFileDescriptor(
sockets_[0], true, MessageLoopForIO::WATCH_READ,
&watcher_, terminate_monitor_.get());
if (!*success) {
- LOG(ERROR) << "WatchFileDescriptor";
+ DLOG(ERROR) << "WatchFileDescriptor";
signal->Signal();
return;
}
@@ -81,7 +81,7 @@ void ServiceProcessState::StateData::SignalReady(base::WaitableEvent* signal,
action.sa_flags = SA_SIGINFO;
*success = sigaction(SIGTERM, &action, &old_action_) == 0;
if (!*success) {
- PLOG(ERROR) << "sigaction";
+ DPLOG(ERROR) << "sigaction";
signal->Signal();
return;
}
@@ -95,7 +95,7 @@ void ServiceProcessState::StateData::SignalReady(base::WaitableEvent* signal,
#if defined(OS_MACOSX)
*success = WatchExecutable();
if (!*success) {
- LOG(ERROR) << "WatchExecutable";
+ DLOG(ERROR) << "WatchExecutable";
signal->Signal();
return;
}
@@ -108,24 +108,24 @@ void ServiceProcessState::StateData::SignalReady(base::WaitableEvent* signal,
ServiceProcessState::StateData::~StateData() {
if (sockets_[0] != -1) {
if (HANDLE_EINTR(close(sockets_[0]))) {
- PLOG(ERROR) << "close";
+ DPLOG(ERROR) << "close";
}
}
if (sockets_[1] != -1) {
if (HANDLE_EINTR(close(sockets_[1]))) {
- PLOG(ERROR) << "close";
+ DPLOG(ERROR) << "close";
}
}
if (set_action_) {
if (sigaction(SIGTERM, &old_action_, NULL) < 0) {
- PLOG(ERROR) << "sigaction";
+ DPLOG(ERROR) << "sigaction";
}
}
g_signal_socket = -1;
}
void ServiceProcessState::CreateState() {
- CHECK(!state_);
+ DCHECK(!state_);
state_ = new StateData;
// Explicitly adding a reference here (and removing it in TearDownState)
@@ -137,7 +137,7 @@ void ServiceProcessState::CreateState() {
bool ServiceProcessState::SignalReady(
base::MessageLoopProxy* message_loop_proxy, Task* terminate_task) {
- CHECK(state_);
+ DCHECK(state_);
scoped_ptr<Task> scoped_terminate_task(terminate_task);
#if defined(OS_POSIX) && !defined(OS_MACOSX)
@@ -149,7 +149,7 @@ bool ServiceProcessState::SignalReady(
state_->terminate_monitor_.reset(
new ServiceProcessTerminateMonitor(scoped_terminate_task.release()));
if (pipe(state_->sockets_) < 0) {
- PLOG(ERROR) << "pipe";
+ DPLOG(ERROR) << "pipe";
return false;
}
base::WaitableEvent signal_ready(true, false);
diff --git a/chrome/common/service_process_util_win.cc b/chrome/common/service_process_util_win.cc
index b8e2d85..25ff7cf 100644
--- a/chrome/common/service_process_util_win.cc
+++ b/chrome/common/service_process_util_win.cc
@@ -56,7 +56,7 @@ class ServiceProcessTerminateMonitor
}
void Start() {
string16 event_name = GetServiceProcessTerminateEventName();
- CHECK(event_name.length() <= MAX_PATH);
+ DCHECK(event_name.length() <= MAX_PATH);
terminate_event_.Set(CreateEvent(NULL, TRUE, FALSE, event_name.c_str()));
watcher_.StartWatching(terminate_event_.Get(), this);
}
@@ -111,14 +111,14 @@ struct ServiceProcessState::StateData {
};
void ServiceProcessState::CreateState() {
- CHECK(!state_);
+ DCHECK(!state_);
state_ = new StateData;
}
bool ServiceProcessState::TakeSingletonLock() {
DCHECK(state_);
string16 event_name = GetServiceProcessReadyEventName();
- CHECK(event_name.length() <= MAX_PATH);
+ DCHECK(event_name.length() <= MAX_PATH);
base::win::ScopedHandle service_process_ready_event;
service_process_ready_event.Set(
CreateEvent(NULL, TRUE, FALSE, event_name.c_str()));
diff --git a/chrome/common/web_apps.cc b/chrome/common/web_apps.cc
index b6591b7..485d5cd 100644
--- a/chrome/common/web_apps.cc
+++ b/chrome/common/web_apps.cc
@@ -209,7 +209,7 @@ bool ParseWebAppFromWebDocument(WebFrame* frame,
bool ParseWebAppFromDefinitionFile(Value* definition_value,
WebApplicationInfo* web_app,
string16* error) {
- CHECK(web_app->manifest_url.is_valid());
+ DCHECK(web_app->manifest_url.is_valid());
int error_code = 0;
std::string error_message;
@@ -220,9 +220,9 @@ bool ParseWebAppFromDefinitionFile(Value* definition_value,
false, // disallow trailing comma
&error_code,
&error_message));
- CHECK(schema.get())
+ DCHECK(schema.get())
<< "Error parsing JSON schema: " << error_code << ": " << error_message;
- CHECK(schema->IsType(Value::TYPE_DICTIONARY))
+ DCHECK(schema->IsType(Value::TYPE_DICTIONARY))
<< "schema root must be dictionary.";
JSONSchemaValidator validator(static_cast<DictionaryValue*>(schema.get()));
@@ -239,7 +239,7 @@ bool ParseWebAppFromDefinitionFile(Value* definition_value,
// This must be true because the schema requires the root value to be a
// dictionary.
- CHECK(definition_value->IsType(Value::TYPE_DICTIONARY));
+ DCHECK(definition_value->IsType(Value::TYPE_DICTIONARY));
DictionaryValue* definition = static_cast<DictionaryValue*>(definition_value);
// Parse launch URL. It must be a valid URL in the same origin as the
diff --git a/chrome/common/zip.cc b/chrome/common/zip.cc
index 5d92c11..658384a 100644
--- a/chrome/common/zip.cc
+++ b/chrome/common/zip.cc
@@ -175,14 +175,14 @@ bool Unzip(const FilePath& src_file, const FilePath& dest_dir) {
unzFile zip_file = unzOpen2(src_file_str.c_str(), &zip_funcs);
#endif
if (!zip_file) {
- LOG(WARNING) << "couldn't create file " << src_file_str;
+ DLOG(WARNING) << "couldn't create file " << src_file_str;
return false;
}
unz_global_info zip_info;
int err;
err = unzGetGlobalInfo(zip_file, &zip_info);
if (err != UNZ_OK) {
- LOG(WARNING) << "couldn't open zip " << src_file_str;
+ DLOG(WARNING) << "couldn't open zip " << src_file_str;
return false;
}
bool ret = true;
@@ -195,7 +195,7 @@ bool Unzip(const FilePath& src_file, const FilePath& dest_dir) {
if (i + 1 < zip_info.number_entry) {
err = unzGoToNextFile(zip_file);
if (err != UNZ_OK) {
- LOG(WARNING) << "error %d in unzGoToNextFile";
+ DLOG(WARNING) << "error %d in unzGoToNextFile";
ret = false;
break;
}
@@ -209,8 +209,8 @@ static bool AddFileToZip(zipFile zip_file, const FilePath& src_dir) {
net::FileStream stream;
int flags = base::PLATFORM_FILE_OPEN | base::PLATFORM_FILE_READ;
if (stream.Open(src_dir, flags) != 0) {
- LOG(ERROR) << "Could not open stream for path "
- << src_dir.value();
+ DLOG(ERROR) << "Could not open stream for path "
+ << src_dir.value();
return false;
}
@@ -220,8 +220,8 @@ static bool AddFileToZip(zipFile zip_file, const FilePath& src_dir) {
num_bytes = stream.Read(buf, kZipBufSize, net::CompletionCallback());
if (num_bytes > 0) {
if (ZIP_OK != zipWriteInFileInZip(zip_file, buf, num_bytes)) {
- LOG(ERROR) << "Could not write data to zip for path "
- << src_dir.value();
+ DLOG(ERROR) << "Could not write data to zip for path "
+ << src_dir.value();
return false;
}
}
@@ -249,7 +249,7 @@ static bool AddEntryToZip(zipFile zip_file, const FilePath& path,
NULL, NULL, 0u, NULL, 0u, NULL, // file info, extrafield local, length,
// extrafield global, length, comment
Z_DEFLATED, Z_DEFAULT_COMPRESSION)) {
- LOG(ERROR) << "Could not open zip file entry " << str_path;
+ DLOG(ERROR) << "Could not open zip file entry " << str_path;
return false;
}
@@ -259,7 +259,7 @@ static bool AddEntryToZip(zipFile zip_file, const FilePath& path,
}
if (ZIP_OK != zipCloseFileInZip(zip_file)) {
- LOG(ERROR) << "Could not close zip file entry " << str_path;
+ DLOG(ERROR) << "Could not close zip file entry " << str_path;
return false;
}
@@ -288,7 +288,7 @@ bool ZipWithFilterCallback(const FilePath& src_dir, const FilePath& dest_file,
#endif
if (!zip_file) {
- LOG(WARNING) << "couldn't create file " << dest_file_str;
+ DLOG(WARNING) << "couldn't create file " << dest_file_str;
return false;
}
@@ -311,7 +311,7 @@ bool ZipWithFilterCallback(const FilePath& src_dir, const FilePath& dest_file,
}
if (ZIP_OK != zipClose(zip_file, NULL)) { // global comment
- LOG(ERROR) << "Error closing zip file " << dest_file_str;
+ DLOG(ERROR) << "Error closing zip file " << dest_file_str;
return false;
}