OLD | NEW |
1 # Copyright 2016 The Chromium Authors. All rights reserved. | 1 # Copyright 2016 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 source_set("sessions") { | 5 source_set("sessions") { |
6 configs += [ "//build/config/compiler:enable_arc" ] | 6 configs += [ "//build/config/compiler:enable_arc" ] |
7 sources = [ | 7 sources = [ |
8 "ios_chrome_session_tab_helper.h", | 8 "ios_chrome_session_tab_helper.h", |
9 "ios_chrome_session_tab_helper.mm", | 9 "ios_chrome_session_tab_helper.mm", |
10 "ios_chrome_tab_restore_service_client.h", | 10 "ios_chrome_tab_restore_service_client.h", |
11 "ios_chrome_tab_restore_service_client.mm", | 11 "ios_chrome_tab_restore_service_client.mm", |
12 "ios_chrome_tab_restore_service_factory.cc", | 12 "ios_chrome_tab_restore_service_factory.cc", |
13 "ios_chrome_tab_restore_service_factory.h", | 13 "ios_chrome_tab_restore_service_factory.h", |
14 ] | 14 ] |
15 deps = [ | 15 deps = [ |
16 "//base", | 16 "//base", |
17 "//components/keyed_service/ios", | 17 "//components/keyed_service/ios", |
18 "//components/sessions", | 18 "//components/sessions", |
19 "//ios/chrome/browser", | 19 "//ios/chrome/browser", |
20 "//ios/chrome/browser/browser_state", | 20 "//ios/chrome/browser/browser_state", |
| 21 "//ios/chrome/browser/tabs", |
| 22 "//ios/chrome/browser/ui:browser_list", |
21 "//ios/public/provider/chrome/browser", | 23 "//ios/public/provider/chrome/browser", |
22 "//ios/public/provider/chrome/browser/sessions", | |
23 "//ios/web", | 24 "//ios/web", |
24 "//url", | 25 "//url", |
25 ] | 26 ] |
| 27 public_deps = [ |
| 28 ":sessions_non_arc", |
| 29 ] |
26 } | 30 } |
27 | 31 |
28 source_set("sessions_internal") { | 32 source_set("sessions_non_arc") { |
| 33 visibility = [ ":sessions" ] |
29 sources = [ | 34 sources = [ |
30 "NSCoder+Compatibility.h", | 35 "NSCoder+Compatibility.h", |
31 "NSCoder+Compatibility.mm", | 36 "NSCoder+Compatibility.mm", |
32 "session_service.h", | 37 "session_service.h", |
33 "session_service.mm", | 38 "session_service.mm", |
34 "session_util.h", | 39 "session_util.h", |
35 "session_util.mm", | 40 "session_util.mm", |
36 "session_window.h", | 41 "session_window.h", |
37 "session_window.mm", | 42 "session_window.mm", |
38 "tab_restore_service_delegate_impl_ios.h", | 43 "tab_restore_service_delegate_impl_ios.h", |
39 "tab_restore_service_delegate_impl_ios.mm", | 44 "tab_restore_service_delegate_impl_ios.mm", |
40 "tab_restore_service_delegate_impl_ios_factory.h", | 45 "tab_restore_service_delegate_impl_ios_factory.h", |
41 "tab_restore_service_delegate_impl_ios_factory.mm", | 46 "tab_restore_service_delegate_impl_ios_factory.mm", |
42 "tab_restore_service_delegate_provider_impl.h", | |
43 "tab_restore_service_delegate_provider_impl.mm", | |
44 ] | 47 ] |
45 deps = [ | 48 deps = [ |
46 "//base", | 49 "//base", |
47 "//components/keyed_service/core", | 50 "//components/keyed_service/core", |
48 "//components/keyed_service/ios", | 51 "//components/keyed_service/ios", |
49 "//components/sessions", | 52 "//components/sessions", |
50 "//ios/chrome/browser/browser_state", | 53 "//ios/chrome/browser/browser_state", |
51 "//ios/chrome/browser/tabs", | 54 "//ios/chrome/browser/tabs", |
52 "//ios/chrome/browser/ui:browser_list", | 55 "//ios/chrome/browser/ui:browser_list", |
53 "//ios/public/provider/chrome/browser/sessions", | |
54 "//ios/web", | 56 "//ios/web", |
55 "//net", | 57 "//net", |
56 ] | 58 ] |
57 libs = [ "UIKit.framework" ] | 59 libs = [ "UIKit.framework" ] |
58 } | 60 } |
59 | 61 |
60 source_set("test_support") { | 62 source_set("test_support") { |
61 testonly = true | 63 testonly = true |
62 sources = [ | 64 sources = [ |
63 "test_session_service.h", | 65 "test_session_service.h", |
64 "test_session_service.mm", | 66 "test_session_service.mm", |
65 ] | 67 ] |
66 deps = [ | 68 deps = [ |
67 ":sessions_internal", | 69 ":sessions", |
68 ] | 70 ] |
69 } | 71 } |
70 | 72 |
71 source_set("unit_tests") { | 73 source_set("unit_tests") { |
72 testonly = true | 74 testonly = true |
73 sources = [ | 75 sources = [ |
74 "session_service_unittest.mm", | 76 "session_service_unittest.mm", |
75 "session_window_unittest.mm", | 77 "session_window_unittest.mm", |
76 ] | 78 ] |
77 deps = [ | 79 deps = [ |
78 ":resources_unit_tests", | 80 ":resources_unit_tests", |
79 ":sessions_internal", | 81 ":sessions", |
80 "//base", | 82 "//base", |
81 "//ios/chrome/browser", | 83 "//ios/chrome/browser", |
82 "//ios/chrome/browser/browser_state:test_support", | 84 "//ios/chrome/browser/browser_state:test_support", |
83 "//ios/web", | 85 "//ios/web", |
84 "//ios/web:test_support", | 86 "//ios/web:test_support", |
85 "//testing/gtest", | 87 "//testing/gtest", |
86 "//third_party/ocmock", | 88 "//third_party/ocmock", |
87 ] | 89 ] |
88 } | 90 } |
89 | 91 |
90 bundle_data("resources_unit_tests") { | 92 bundle_data("resources_unit_tests") { |
91 visibility = [ ":unit_tests" ] | 93 visibility = [ ":unit_tests" ] |
92 testonly = true | 94 testonly = true |
93 sources = [ | 95 sources = [ |
94 "//ios/chrome/test/data/sessions/corrupted.plist", | 96 "//ios/chrome/test/data/sessions/corrupted.plist", |
95 ] | 97 ] |
96 outputs = [ | 98 outputs = [ |
97 "{{bundle_resources_dir}}/ios/chrome/test/data/sessions/{{source_file_part}}
", | 99 "{{bundle_resources_dir}}/ios/chrome/test/data/sessions/{{source_file_part}}
", |
98 ] | 100 ] |
99 } | 101 } |
OLD | NEW |