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 #ifndef CHROME_BROWSER_PARSERS_METADATA_PARSER_FACTORY_H_
6 #define CHROME_BROWSER_PARSERS_METADATA_PARSER_FACTORY_H_
8 #include "chrome/browser/parsers/metadata_parser.h"
14 // Used to check to see if a parser can parse a particular file, and allows
15 // for creation of a parser on a particular file.
16 class MetadataParserFactory
{
18 MetadataParserFactory() {}
19 virtual ~MetadataParserFactory() {}
21 // Used to check to see if the parser can parse the given file. This
22 // should not do any additional reading of the file.
23 virtual bool CanParse(const base::FilePath
& path
,
27 // Creates the parser on the given file. Creating the parser does not
28 // do any parsing on the file. Parse has to be called on the parser.
29 virtual MetadataParser
* CreateParser(const base::FilePath
& path
) = 0;
32 #endif // CHROME_BROWSER_PARSERS_METADATA_PARSER_FACTORY_H_