Chromium Code Reviews| Index: services/service_cache/BUILD.gn |
| diff --git a/services/service_cache/BUILD.gn b/services/service_cache/BUILD.gn |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..a5a3b306e67cec2cebdd008dfdb608a400b51042 |
| --- /dev/null |
| +++ b/services/service_cache/BUILD.gn |
| @@ -0,0 +1,90 @@ |
| +# 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. |
| + |
| +import("//build/module_args/mojo.gni") |
| +import("//mojo/public/mojo_application.gni") |
| +import("//mojo/public/tools/bindings/mojom.gni") |
| +import("//mojo/tools/embed/rules.gni") |
| + |
| +source_set("service_cache") { |
|
DaveMoore
2015/05/05 21:20:59
Why not a native application?
qsr
2015/05/06 08:13:49
Because this is used as part of application loadin
|
| + sources = [ |
| + "service_cache_app.cc", |
| + "service_cache_app.h", |
| + "service_cache_impl.cc", |
| + "service_cache_impl.h", |
| + ] |
| + |
| + deps = [ |
| + ":bindings", |
| + "//base", |
| + "//mojo/application", |
| + "//mojo/common", |
| + "//mojo/environment:chromium", |
| + "//mojo/public/cpp/application", |
| + "//mojo/public/cpp/system", |
| + "//mojo/services/service_cache/public/interfaces", |
| + "//third_party/zlib:zip", |
| + "//url:url", |
| + ] |
| +} |
| + |
| +mojom("bindings") { |
| + sources = [ |
| + "service_cache_entry.mojom", |
| + ] |
| +} |
| + |
| +mojo_native_application("tests") { |
| + output_name = "service_cache_apptests" |
| + |
| + testonly = true |
| + |
| + sources = [ |
| + "service_cache_apptest.cc", |
| + ] |
| + |
| + deps = [ |
| + ":embed_test_data", |
| + "//base", |
| + "//mojo/application", |
| + "//mojo/application:test_support", |
| + "//mojo/common", |
| + "//mojo/public/cpp/bindings", |
| + "//mojo/public/cpp/system:system", |
| + "//mojo/services/network/public/interfaces:interfaces", |
| + "//mojo/services/service_cache/public/interfaces", |
| + ] |
| + |
| + data_deps = [ ":service_cache" ] |
| +} |
| + |
| +action("test_data") { |
| + script = "//mojo/public/tools/gn/zip.py" |
| + inputs = [ |
| + "test_data/file1", |
| + "test_data/file2", |
| + ] |
| + output = "$target_out_dir/test_data.zip" |
| + outputs = [ |
| + output, |
| + ] |
| + rebase_base_dir = rebase_path("test_data", root_build_dir) |
| + rebase_inputs = rebase_path(inputs, root_build_dir) |
| + rebase_output = rebase_path(output, root_build_dir) |
| + args = [ |
| + "--base-dir=$rebase_base_dir", |
| + "--inputs=$rebase_inputs", |
| + "--output=$rebase_output", |
| + ] |
| +} |
| + |
| +embed_file("embed_test_data") { |
| + source = "$target_out_dir/test_data.zip" |
| + namespace = "mojo::service_cache" |
| + variable = "kTestData" |
| + |
| + deps = [ |
| + ":test_data", |
| + ] |
| +} |