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

Unified Diff: extensions/common/extension_api.cc

Issue 2561963002: base: Remove the string logging from CHECK(). (Closed)
Patch Set: checkstring: rebase Created 4 years 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
Index: extensions/common/extension_api.cc
diff --git a/extensions/common/extension_api.cc b/extensions/common/extension_api.cc
index a32b095048041a8e9ce15f20be96b6fcd43dca5c..8810ae8edb5ebd8796fa7db695b2f83e46ed08d0 100644
--- a/extensions/common/extension_api.cc
+++ b/extensions/common/extension_api.cc
@@ -51,9 +51,8 @@ std::unique_ptr<base::DictionaryValue> LoadSchemaDictionary(
result.get() ? static_cast<int>(result->GetType()) : -1,
error_message.c_str());
- CHECK(result.get()) << error_message << " for schema " << schema;
- CHECK(result->IsType(base::Value::Type::DICTIONARY)) << " for schema "
- << schema;
+ CHECK(result.get());
+ CHECK(result->IsType(base::Value::Type::DICTIONARY));
return base::DictionaryValue::From(std::move(result));
}
@@ -62,8 +61,7 @@ const base::DictionaryValue* FindListItem(const base::ListValue* list,
const std::string& property_value) {
for (size_t i = 0; i < list->GetSize(); ++i) {
const base::DictionaryValue* item = NULL;
- CHECK(list->GetDictionary(i, &item))
- << property_value << "/" << property_name;
+ CHECK(list->GetDictionary(i, &item));
std::string value;
if (item->GetString(property_name, &value) && value == property_value)
return item;
@@ -199,8 +197,8 @@ bool ExtensionAPI::IsAnyFeatureAvailableToContext(
return false;
const Feature* alias = provider->second->GetFeature(alias_name);
- CHECK(alias) << "Cannot find alias feature " << alias_name
- << " for API feature " << api.name();
+ // Cannot find alias feature |alias_name| for API feature |api.name()|
+ CHECK(alias);
return IsAnyFeatureAvailableToContext(*alias, extension, context, url,
CheckAliasStatus::NOT_ALLOWED);
}
@@ -355,8 +353,8 @@ Feature::Availability ExtensionAPI::IsAliasAvailable(
if (!alias_feature)
alias_feature = provider->second->GetFeature(alias);
- CHECK(alias_feature) << "Cannot find alias feature " << alias
- << " for API feature " << feature->name();
+ // Cannot find alias feature |alias| for API feature |feature->name()|
+ CHECK(alias_feature);
return alias_feature->IsAvailableToContext(extension, context, url);
}

Powered by Google App Engine
This is Rietveld 408576698