summaryrefslogtreecommitdiffstats
path: root/printing/image.cc
diff options
context:
space:
mode:
authorevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-08 17:49:05 +0000
committerevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-08 17:49:05 +0000
commit63597e4ebc117bb561b93f4d775d787120e6728a (patch)
treea4825625ef2ff06b339e56a30fa5ae80aea29160 /printing/image.cc
parentc48abb01ae7e295e283f190bd05270e835b8d37f (diff)
downloadchromium_src-63597e4ebc117bb561b93f4d775d787120e6728a.zip
chromium_src-63597e4ebc117bb561b93f4d775d787120e6728a.tar.gz
chromium_src-63597e4ebc117bb561b93f4d775d787120e6728a.tar.bz2
Deprecate most of the remaining wstring file_util functions.
These still exist on Windows due to being used by the installer, but by moving them into the Windows-only block we prevent them from being used in new code. (I am already finding new code using some of these! I am glad to be rid of them.) BUG=24672 Review URL: http://codereview.chromium.org/2850042 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@51862 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'printing/image.cc')
-rw-r--r--printing/image.cc9
1 files changed, 4 insertions, 5 deletions
diff --git a/printing/image.cc b/printing/image.cc
index d12d3d60..77f5d5e 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);