| Index: printing/printing_utils.cc
|
| diff --git a/printing/printing_utils.cc b/printing/printing_utils.cc
|
| index 3d91de1bf0bfb0cf6cfbeb65e546b4605c0b4ce6..02520382be39c0faf4f7b3fa849742eca05970bf 100644
|
| --- a/printing/printing_utils.cc
|
| +++ b/printing/printing_utils.cc
|
| @@ -9,20 +9,21 @@
|
| #include "third_party/icu/source/common/unicode/uchar.h"
|
| #include "ui/gfx/text_elider.h"
|
|
|
| -namespace {
|
| -const int kMaxDocumentTitleLength = 50;
|
| -}
|
| -
|
| namespace printing {
|
|
|
| -base::string16 SimplifyDocumentTitle(const base::string16& title) {
|
| +base::string16 SimplifyDocumentTitleWithLength(const base::string16& title,
|
| + size_t length) {
|
| base::string16 no_controls(title);
|
| no_controls.erase(
|
| std::remove_if(no_controls.begin(), no_controls.end(), &u_iscntrl),
|
| no_controls.end());
|
| base::string16 result;
|
| - gfx::ElideString(no_controls, kMaxDocumentTitleLength, &result);
|
| + gfx::ElideString(no_controls, static_cast<int>(length), &result);
|
| return result;
|
| }
|
|
|
| +base::string16 SimplifyDocumentTitle(const base::string16& title) {
|
| + return SimplifyDocumentTitleWithLength(title, kMaxDocumentTitleLength);
|
| +}
|
| +
|
| } // namespace printing
|
|
|