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

Unified Diff: chrome/common/variations/BUILD.gn

Issue 1209743002: Generate a static struct from fieldtrial_testing_config (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@codegen_nested_structs
Patch Set: add +x file permission Created 5 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 | « chrome/common/BUILD.gn ('k') | chrome/common/variations/fieldtrial_testing_config.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/variations/BUILD.gn
diff --git a/chrome/common/variations/BUILD.gn b/chrome/common/variations/BUILD.gn
new file mode 100644
index 0000000000000000000000000000000000000000..1b31690c68f58c2e8e14bc7e418fa1c3ea3d80cc
--- /dev/null
+++ b/chrome/common/variations/BUILD.gn
@@ -0,0 +1,55 @@
+# Copyright 2015 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+action("fieldtrial_testing_config_action") {
+ visibility = [ ":fieldtrial_testing_config" ]
+ script = "//tools/variations/fieldtrial_to_struct.py"
+
+ if (is_win) {
+ source = "//testing/variations/fieldtrial_testing_config_win.json"
+ }
+ if (is_mac) {
+ source = "//testing/variations/fieldtrial_testing_config_mac.json"
+ }
+ if (is_linux) {
+ source = "//testing/variations/fieldtrial_testing_config_linux.json"
+ }
+ if (is_chromeos) {
+ source = "//testing/variations/fieldtrial_testing_config_chromeos.json"
+ }
+ if (is_android) {
+ source = "//testing/variations/fieldtrial_testing_config_android.json"
+ }
+ if (is_ios) {
+ source = "//testing/variations/fieldtrial_testing_config_ios.json"
+ }
+
+ inputs = [
+ "//tools/json_to_struct/element_generator.py",
+ "//tools/json_to_struct/json_to_struct.py",
+ "//tools/json_to_struct/struct_generator.py",
+ source,
+ ]
+ out_name = "fieldtrial_testing_config"
+ outputs = [
+ "$target_gen_dir/$out_name.cc",
+ "$target_gen_dir/$out_name.h",
+ ]
+
+ args = [
+ rebase_path(source, root_build_dir),
+ "--destbase=" + rebase_path(target_gen_dir, root_build_dir),
+ "--namespace=chrome_variations",
+ "--schema=" +
+ rebase_path("fieldtrial_testing_config_schema.json", root_build_dir),
+ "--output=$out_name",
+ ]
+}
+
+source_set("fieldtrial_testing_config") {
+ sources = get_target_outputs(":fieldtrial_testing_config_action")
+ deps = [
+ ":fieldtrial_testing_config_action",
+ ]
+}
« no previous file with comments | « chrome/common/BUILD.gn ('k') | chrome/common/variations/fieldtrial_testing_config.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698