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

Unified Diff: tools/gn/config_values_extractors.h

Issue 48523006: GN: Separately track labels and origins for lists of stuff (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 2 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 | « tools/gn/command_gyp.cc ('k') | tools/gn/gn.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gn/config_values_extractors.h
diff --git a/tools/gn/config_values_extractors.h b/tools/gn/config_values_extractors.h
index 454133979ac96107fb49fd9f33921a23f778ac3a..00eb9689c66c96c6a627f93cb50cad198e826cee 100644
--- a/tools/gn/config_values_extractors.h
+++ b/tools/gn/config_values_extractors.h
@@ -40,7 +40,15 @@ class ConfigValuesIterator {
const ConfigValues& cur() const {
if (cur_index_ == -1)
return target_->config_values();
- return target_->configs()[cur_index_]->config_values();
+ return target_->configs()[cur_index_].ptr->config_values();
+ }
+
+ // Returns the origin of who added this config, if any. This will alwsya be
+ // null for the config values of a target itself.
+ const ParseNode* origin() const {
+ if (cur_index_ == -1)
+ return NULL;
+ return target_->configs()[cur_index_].origin;
}
void Next() {
@@ -52,7 +60,7 @@ class ConfigValuesIterator {
const Config* GetCurrentConfig() const {
if (cur_index_ == -1)
return NULL;
- return target_->configs()[cur_index_];
+ return target_->configs()[cur_index_].ptr;
}
private:
« no previous file with comments | « tools/gn/command_gyp.cc ('k') | tools/gn/gn.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698