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/public/provider/chrome/browser", | 21 "//ios/public/provider/chrome/browser", |
22 "//ios/public/provider/chrome/browser/sessions", | 22 "//ios/public/provider/chrome/browser/sessions", |
23 "//ios/web", | 23 "//ios/web", |
24 "//url", | 24 "//url", |
25 ] | 25 ] |
26 } | 26 } |
| 27 |
| 28 source_set("sessions_internal") { |
| 29 sources = [ |
| 30 "NSCoder+Compatibility.h", |
| 31 "NSCoder+Compatibility.mm", |
| 32 "session_service.h", |
| 33 "session_service.mm", |
| 34 "session_util.h", |
| 35 "session_util.mm", |
| 36 "session_window.h", |
| 37 "session_window.mm", |
| 38 "tab_restore_service_delegate_impl_ios.h", |
| 39 "tab_restore_service_delegate_impl_ios.mm", |
| 40 "tab_restore_service_delegate_impl_ios_factory.h", |
| 41 "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 ] |
| 45 deps = [ |
| 46 "//base", |
| 47 "//components/keyed_service/core", |
| 48 "//components/keyed_service/ios", |
| 49 "//components/sessions", |
| 50 "//ios/chrome/browser/browser_state", |
| 51 "//ios/chrome/browser/tabs", |
| 52 "//ios/chrome/browser/ui:browser_list", |
| 53 "//ios/public/provider/chrome/browser/sessions", |
| 54 "//ios/web", |
| 55 "//net", |
| 56 ] |
| 57 libs = [ "UIKit.framework" ] |
| 58 } |
| 59 |
| 60 source_set("test_support") { |
| 61 testonly = true |
| 62 sources = [ |
| 63 "test_session_service.h", |
| 64 "test_session_service.mm", |
| 65 ] |
| 66 deps = [ |
| 67 ":sessions_internal", |
| 68 ] |
| 69 } |
| 70 |
| 71 source_set("unit_tests") { |
| 72 testonly = true |
| 73 sources = [ |
| 74 "session_service_unittest.mm", |
| 75 "session_window_unittest.mm", |
| 76 ] |
| 77 deps = [ |
| 78 ":resources_unit_tests", |
| 79 ":sessions_internal", |
| 80 "//base", |
| 81 "//ios/chrome/browser", |
| 82 "//ios/chrome/browser/browser_state:test_support", |
| 83 "//ios/web", |
| 84 "//ios/web:test_support", |
| 85 "//testing/gtest", |
| 86 "//third_party/ocmock", |
| 87 ] |
| 88 } |
| 89 |
| 90 bundle_data("resources_unit_tests") { |
| 91 visibility = [ ":unit_tests" ] |
| 92 testonly = true |
| 93 sources = [ |
| 94 "//ios/chrome/test/data/sessions/corrupted.plist", |
| 95 ] |
| 96 outputs = [ |
| 97 "{{bundle_resources_dir}}/ios/chrome/test/data/sessions/{{source_file_part}}
", |
| 98 ] |
| 99 } |
OLD | NEW |