| Index: printing/image.cc
|
| diff --git a/printing/image.cc b/printing/image.cc
|
| index d12d3d602b2fa818422c8163d8f187f48777ea95..77f5d5ef610d0e6495c0c5f21e2d7fe24ad5acd0 100644
|
| --- a/printing/image.cc
|
| +++ b/printing/image.cc
|
| @@ -60,16 +60,15 @@ class DisableFontSmoothing {
|
|
|
| namespace printing {
|
|
|
| -Image::Image(const std::wstring& filename)
|
| +Image::Image(const FilePath& path)
|
| : row_length_(0),
|
| ignore_alpha_(true) {
|
| std::string data;
|
| - file_util::ReadFileToString(filename, &data);
|
| - std::wstring ext = file_util::GetFileExtensionFromPath(filename);
|
| + file_util::ReadFileToString(path, &data);
|
| bool success = false;
|
| - if (LowerCaseEqualsASCII(ext, "png")) {
|
| + if (path.MatchesExtension(FILE_PATH_LITERAL(".png"))) {
|
| success = LoadPng(data);
|
| - } else if (LowerCaseEqualsASCII(ext, "emf")) {
|
| + } else if (path.MatchesExtension(FILE_PATH_LITERAL(".emf"))) {
|
| success = LoadMetafile(data);
|
| } else {
|
| DCHECK(false);
|
|
|