OLD | NEW |
1 # Copyright 2017 The Chromium Authors. All rights reserved. | 1 # Copyright 2017 The Chromium Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 if (is_android) { | 5 if (is_android) { |
6 import("//build/config/android/rules.gni") | 6 import("//build/config/android/rules.gni") |
7 } | 7 } |
| 8 import("//third_party/protobuf/proto_library.gni") |
8 | 9 |
9 static_library("prefetch") { | 10 static_library("prefetch") { |
10 sources = [ | 11 sources = [ |
| 12 "generate_page_bundle_request.cc", |
| 13 "generate_page_bundle_request.h", |
11 "prefetch_request_fetcher.cc", | 14 "prefetch_request_fetcher.cc", |
12 "prefetch_request_fetcher.h", | 15 "prefetch_request_fetcher.h", |
13 "prefetch_service.h", | 16 "prefetch_service.h", |
14 "prefetch_service_impl.cc", | 17 "prefetch_service_impl.cc", |
15 "prefetch_service_impl.h", | 18 "prefetch_service_impl.h", |
16 ] | 19 ] |
17 | 20 |
| 21 public_deps = [ |
| 22 ":proto", |
| 23 ] |
18 deps = [ | 24 deps = [ |
19 "//base", | 25 "//base", |
20 "//components/keyed_service/core", | 26 "//components/keyed_service/core", |
21 "//components/offline_pages/core", | 27 "//components/offline_pages/core", |
22 "//net:net", | 28 "//net:net", |
23 "//url", | 29 "//url", |
24 ] | 30 ] |
25 } | 31 } |
26 | 32 |
| 33 proto_library("proto") { |
| 34 sources = [ |
| 35 "proto/any.proto", |
| 36 "proto/offline_pages.proto", |
| 37 "proto/operation.proto", |
| 38 "proto/status.proto", |
| 39 "proto/timestamp.proto", |
| 40 ] |
| 41 } |
| 42 |
27 source_set("unit_tests") { | 43 source_set("unit_tests") { |
28 testonly = true | 44 testonly = true |
29 sources = [ | 45 sources = [ |
| 46 "generate_page_bundle_request_unittest.cc", |
30 "prefetch_request_fetcher_unittest.cc", | 47 "prefetch_request_fetcher_unittest.cc", |
| 48 "prefetch_request_test_base.cc", |
| 49 "prefetch_request_test_base.h", |
31 "prefetch_service_impl_unittest.cc", | 50 "prefetch_service_impl_unittest.cc", |
32 ] | 51 ] |
33 | 52 |
34 deps = [ | 53 deps = [ |
35 ":prefetch", | 54 ":prefetch", |
36 "//components/offline_pages/core", | 55 "//components/offline_pages/core", |
37 "//net:test_support", | 56 "//net:test_support", |
38 "//testing/gmock", | 57 "//testing/gmock", |
39 "//testing/gtest", | 58 "//testing/gtest", |
40 "//url", | 59 "//url", |
41 ] | 60 ] |
42 } | 61 } |
OLD | NEW |