Disable view source for Developer Tools.
[chromium-blink-merge.git] / chrome / browser / parsers / metadata_parser_factory.h
blobc6c5a2616f8ed516f1b722ec3dbf3017ed54684f
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"
10 namespace base {
11 class FilePath;
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 {
17 public:
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,
24 char* bytes,
25 int bytes_size) = 0;
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_