Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(296)

Side by Side Diff: chrome/browser/parsers/metadata_parser_manager.h

Issue 5685007: Rename all methods accessing Singleton<T> as GetInstance(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 10 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/page_info_model.cc ('k') | chrome/browser/parsers/metadata_parser_manager.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_PARSERS_METADATA_PARSER_MANAGER_H_ 5 #ifndef CHROME_BROWSER_PARSERS_METADATA_PARSER_MANAGER_H_
6 #define CHROME_BROWSER_PARSERS_METADATA_PARSER_MANAGER_H_ 6 #define CHROME_BROWSER_PARSERS_METADATA_PARSER_MANAGER_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/scoped_vector.h" 10 #include "base/scoped_vector.h"
11 11
12 class MetadataParserFactory; 12 class MetadataParserFactory;
13 class FilePath; 13 class FilePath;
14 class MetadataParser; 14 class MetadataParser;
15 15
16 // Metadata Parser manager is used to find the correct parser for a 16 // Metadata Parser manager is used to find the correct parser for a
17 // given file. Allows parsers to register themselves. 17 // given file. Allows parsers to register themselves.
18 class MetadataParserManager { 18 class MetadataParserManager {
19 public: 19 public:
20 // Creates a new MetadataParserManager. 20 // Creates a new MetadataParserManager.
21 MetadataParserManager(); 21 MetadataParserManager();
22 ~MetadataParserManager(); 22 ~MetadataParserManager();
23 23
24 // Gets the singleton 24 // Gets the singleton
25 static MetadataParserManager* Get(); 25 static MetadataParserManager* GetInstance();
26 26
27 // Adds a new Parser to the manager, when requests come in for a parser 27 // Adds a new Parser to the manager, when requests come in for a parser
28 // the manager will loop through the list of parsers, and query each. 28 // the manager will loop through the list of parsers, and query each.
29 bool RegisterParserFactory(MetadataParserFactory* parser); 29 bool RegisterParserFactory(MetadataParserFactory* parser);
30 30
31 // Returns a new metadata parser for a given file. 31 // Returns a new metadata parser for a given file.
32 MetadataParser* GetParserForFile(const FilePath& path); 32 MetadataParser* GetParserForFile(const FilePath& path);
33 33
34 private: 34 private:
35 ScopedVector<MetadataParserFactory> factories_; 35 ScopedVector<MetadataParserFactory> factories_;
36 36
37 DISALLOW_COPY_AND_ASSIGN(MetadataParserManager); 37 DISALLOW_COPY_AND_ASSIGN(MetadataParserManager);
38 }; 38 };
39 39
40 #endif // CHROME_BROWSER_PARSERS_METADATA_PARSER_MANAGER_H_ 40 #endif // CHROME_BROWSER_PARSERS_METADATA_PARSER_MANAGER_H_
OLDNEW
« no previous file with comments | « chrome/browser/page_info_model.cc ('k') | chrome/browser/parsers/metadata_parser_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698