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

Unified Diff: tools/gn/import_manager.h

Issue 1957483004: GN: Don't import a file more than once. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: typo Created 4 years, 7 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tools/gn/import_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gn/import_manager.h
diff --git a/tools/gn/import_manager.h b/tools/gn/import_manager.h
index bd47a2ad519989ce6ff93087b60069ea54b200f5..78bb613322af8d8ce867ae6ee7be149d51f1c6f8 100644
--- a/tools/gn/import_manager.h
+++ b/tools/gn/import_manager.h
@@ -31,10 +31,13 @@ class ImportManager {
Err* err);
private:
- base::Lock lock_;
+ struct ImportInfo;
+
+ // Protects access to imports_. Do not hold when actually executing imports.
+ base::Lock imports_lock_;
// Owning pointers to the scopes.
- typedef std::map<SourceFile, std::unique_ptr<const Scope>> ImportMap;
+ typedef std::map<SourceFile, std::unique_ptr<ImportInfo>> ImportMap;
ImportMap imports_;
DISALLOW_COPY_AND_ASSIGN(ImportManager);
« no previous file with comments | « no previous file | tools/gn/import_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698