Chromium Code Reviews| Index: ui/base/template_expressions.cc |
| diff --git a/ui/base/template_expressions.cc b/ui/base/template_expressions.cc |
| index 10aaf4fecf5a4e44040c427de461ba5704336fbf..4086c76bf17cce2d9671c7a36917b54d7ceea31a 100644 |
| --- a/ui/base/template_expressions.cc |
| +++ b/ui/base/template_expressions.cc |
| @@ -54,8 +54,7 @@ std::string ReplaceTemplateExpressions( |
| CHECK(!key.empty()); |
| TemplateReplacements::const_iterator value = replacements.find(key); |
| - CHECK(value != replacements.end()) << "$i18n replacement key \"" << key |
| - << "\" not found"; |
| + CHECK(value != replacements.end()); |
|
Alexander Alekseev
2016/12/09 06:14:02
I just came across this CHECK and it turned out th
dcheng
2016/12/09 06:17:24
LOG(FATAL) isn't equivalent: CHECK attempts (but f
Alexander Alekseev
2016/12/09 07:14:50
This means that that most people used CHECK() with
dcheng
2016/12/09 07:29:36
1. We shouldn't unconditionally emit the string: w
Alexander Alekseev
2016/12/09 07:41:23
1) Do you mean that a single explanation message b
dcheng
2016/12/09 07:56:11
Not necessarily, but there's a binary size tradeof
|
| std::string replacement = value->second; |
| if (context.empty()) { |
| @@ -64,7 +63,8 @@ std::string ReplaceTemplateExpressions( |
| } else if (context == "Raw") { |
| // Pass the replacement through unchanged. |
| } else { |
| - CHECK(false) << "Unknown context " << context; |
| + // Unknown context |context| |
| + CHECK(false); |
| } |
| formatted.append(replacement); |