| Index: printing/printing_utils.cc
|
| diff --git a/printing/printing_utils.cc b/printing/printing_utils.cc
|
| index b0544e4f1a3e38be1d7ce860fffcde57f18c6c22..353a0aab1e9a4aca65857e0a6f9f61eee6268528 100644
|
| --- a/printing/printing_utils.cc
|
| +++ b/printing/printing_utils.cc
|
| @@ -9,7 +9,7 @@
|
| #include <algorithm>
|
|
|
| #include "base/logging.h"
|
| -
|
| +#include "base/strings/string_util.h"
|
| #include "base/strings/utf_string_conversions.h"
|
| #include "third_party/icu/source/common/unicode/uchar.h"
|
| #include "ui/gfx/text_elider.h"
|
| @@ -28,6 +28,8 @@ base::string16 SimplifyDocumentTitleWithLength(const base::string16& title,
|
| no_controls.erase(
|
| std::remove_if(no_controls.begin(), no_controls.end(), &u_iscntrl),
|
| no_controls.end());
|
| + base::ReplaceChars(no_controls, base::ASCIIToUTF16("\\"),
|
| + base::ASCIIToUTF16("_"), &no_controls);
|
| base::string16 result;
|
| gfx::ElideString(no_controls, length, &result);
|
| return result;
|
| @@ -38,7 +40,7 @@ base::string16 FormatDocumentTitleWithOwnerAndLength(
|
| const base::string16& title,
|
| size_t length) {
|
| const base::string16 separator = base::ASCIIToUTF16(": ");
|
| - DCHECK(separator.size() < length);
|
| + DCHECK_LT(separator.size(), length);
|
|
|
| base::string16 short_title =
|
| SimplifyDocumentTitleWithLength(owner, length - separator.size());
|
|
|