1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "chrome/browser/parsers/metadata_parser_jpeg_factory.h"
7 #include "base/files/file_path.h"
8 #include "base/strings/utf_string_conversions.h"
9 #include "chrome/browser/parsers/metadata_parser_jpeg.h"
11 MetadataParserJpegFactory::MetadataParserJpegFactory()
12 : MetadataParserFactory() {
15 bool MetadataParserJpegFactory::CanParse(const base::FilePath
& path
,
19 base::FilePath::StringType ext
= base::UTF8ToWide(std::string(".jpg"));
20 #elif defined(OS_POSIX)
21 base::FilePath::StringType ext
= ".jpg";
23 return path
.MatchesExtension(ext
);
26 MetadataParser
* MetadataParserJpegFactory::CreateParser(
27 const base::FilePath
& path
) {
28 JpegMetadataParser
* parser
;
29 parser
= new JpegMetadataParser(path
);