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", |
| 19 "prefetch_types.cc", |
| 20 "prefetch_types.h", |
| 21 "prefetch_utils.cc", |
| 22 "prefetch_utils.h", |
16 ] | 23 ] |
17 | 24 |
| 25 public_deps = [ |
| 26 ":proto", |
| 27 ] |
18 deps = [ | 28 deps = [ |
19 "//base", | 29 "//base", |
20 "//components/keyed_service/core", | 30 "//components/keyed_service/core", |
21 "//components/offline_pages/core", | 31 "//components/offline_pages/core", |
22 "//net:net", | 32 "//net:net", |
23 "//url", | 33 "//url", |
24 ] | 34 ] |
25 } | 35 } |
26 | 36 |
| 37 proto_library("proto") { |
| 38 sources = [ |
| 39 "proto/any.proto", |
| 40 "proto/offline_pages.proto", |
| 41 "proto/operation.proto", |
| 42 "proto/status.proto", |
| 43 "proto/timestamp.proto", |
| 44 ] |
| 45 } |
| 46 |
27 source_set("unit_tests") { | 47 source_set("unit_tests") { |
28 testonly = true | 48 testonly = true |
29 sources = [ | 49 sources = [ |
| 50 "generate_page_bundle_request_unittest.cc", |
30 "prefetch_request_fetcher_unittest.cc", | 51 "prefetch_request_fetcher_unittest.cc", |
| 52 "prefetch_request_test_base.cc", |
| 53 "prefetch_request_test_base.h", |
31 "prefetch_service_impl_unittest.cc", | 54 "prefetch_service_impl_unittest.cc", |
32 ] | 55 ] |
33 | 56 |
34 deps = [ | 57 deps = [ |
35 ":prefetch", | 58 ":prefetch", |
36 "//components/offline_pages/core", | 59 "//components/offline_pages/core", |
37 "//net:test_support", | 60 "//net:test_support", |
38 "//testing/gmock", | 61 "//testing/gmock", |
39 "//testing/gtest", | 62 "//testing/gtest", |
40 "//url", | 63 "//url", |
41 ] | 64 ] |
42 } | 65 } |
OLD | NEW |