OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 TOOLS_GN_IMPORT_MANAGER_H_ | 5 #ifndef TOOLS_GN_IMPORT_MANAGER_H_ |
6 #define TOOLS_GN_IMPORT_MANAGER_H_ | 6 #define TOOLS_GN_IMPORT_MANAGER_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 | 9 |
| 10 #include "base/macros.h" |
10 #include "base/synchronization/lock.h" | 11 #include "base/synchronization/lock.h" |
11 | 12 |
12 class Err; | 13 class Err; |
13 class ParseNode; | 14 class ParseNode; |
14 class Scope; | 15 class Scope; |
15 class SourceFile; | 16 class SourceFile; |
16 | 17 |
17 // Provides a cache of the results of importing scopes so the results can | 18 // Provides a cache of the results of importing scopes so the results can |
18 // be re-used rather than running the imported files multiple times. | 19 // be re-used rather than running the imported files multiple times. |
19 class ImportManager { | 20 class ImportManager { |
(...skipping 12 matching lines...) Expand all Loading... |
32 base::Lock lock_; | 33 base::Lock lock_; |
33 | 34 |
34 // Owning pointers to the scopes. | 35 // Owning pointers to the scopes. |
35 typedef std::map<SourceFile, const Scope*> ImportMap; | 36 typedef std::map<SourceFile, const Scope*> ImportMap; |
36 ImportMap imports_; | 37 ImportMap imports_; |
37 | 38 |
38 DISALLOW_COPY_AND_ASSIGN(ImportManager); | 39 DISALLOW_COPY_AND_ASSIGN(ImportManager); |
39 }; | 40 }; |
40 | 41 |
41 #endif // TOOLS_GN_IMPORT_MANAGER_H_ | 42 #endif // TOOLS_GN_IMPORT_MANAGER_H_ |
OLD | NEW |