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

Unified Diff: tools/gn/builder.h

Issue 2195753002: GN: only write targets that should be generated. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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/builder.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gn/builder.h
diff --git a/tools/gn/builder.h b/tools/gn/builder.h
index d8209bc048f0729716804a7a66b3741e666287fe..c8b54c9fb1637a06a4e7cd4a5bd6dcac9031fb4a 100644
--- a/tools/gn/builder.h
+++ b/tools/gn/builder.h
@@ -22,15 +22,16 @@ class ParseNode;
// the main thread only. See also BuilderRecord.
class Builder {
public:
- typedef base::Callback<void(const BuilderRecord*)> ResolvedCallback;
+ typedef base::Callback<void(const BuilderRecord*)> ResolvedGeneratedCallback;
explicit Builder(Loader* loader);
~Builder();
- // The resolved callback is called whenever a target has been resolved. This
- // will be executed only on the main thread.
- void set_resolved_callback(const ResolvedCallback& cb) {
- resolved_callback_ = cb;
+ // The resolved callback is called when a target has been both resolved and
+ // marked generated. This will be executed only on the main thread.
+ void set_resolved_and_generated_callback(
+ const ResolvedGeneratedCallback& cb) {
+ resolved_and_generated_callback_ = cb;
}
Loader* loader() const { return loader_; }
@@ -132,7 +133,7 @@ class Builder {
typedef base::hash_map<Label, BuilderRecord*> RecordMap;
RecordMap records_;
- ResolvedCallback resolved_callback_;
+ ResolvedGeneratedCallback resolved_and_generated_callback_;
DISALLOW_COPY_AND_ASSIGN(Builder);
};
« no previous file with comments | « no previous file | tools/gn/builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698