Stack sampling profiler: add fire-and-forget interface
[chromium-blink-merge.git] / components / sessions / BUILD.gn
blob8d6006414c54013f7087e397e44d3cbcfe9c3b28
1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
5 if (is_android) {
6   import("//build/config/android/config.gni")
9 config("implementation") {
10   defines = [ "SESSIONS_IMPLEMENTATION" ]
13 if (!is_ios) {
14   # GYP version: components/sessions.gypi:sessions_content
15   component("sessions") {
16     sources = [
17       "content/content_serialized_navigation_builder.cc",
18       "content/content_serialized_navigation_builder.h",
19       "content/content_serialized_navigation_driver.cc",
20       "content/content_serialized_navigation_driver.h",
21     ]
23     configs += [ ":implementation" ]
25     public_deps = [
26       ":shared",
27     ]
29     deps = [
30       ":shared",
31       "//base",
32       "//base/third_party/dynamic_annotations",
33       "//content/public/browser",
34       "//ui/base",
35       "//url",
36     ]
37   }
38 } else {
39   source_set("sessions") {
40     sources = [
41       "ios/ios_serialized_navigation_builder.cc",
42       "ios/ios_serialized_navigation_builder.h",
43       "ios/ios_serialized_navigation_driver.cc",
44       "ios/ios_serialized_navigation_driver.h",
45     ]
47     public_deps = [
48       ":shared",
49     ]
51     deps = [
52       ":shared",
53       "//base",
55       # '../ios/web/ios_web.gyp:ios_web',  TODO(GYP) iOS.
56     ]
57   }
60 # Sources shared between the content and iOS implementations.
61 source_set("shared") {
62   visibility = [ ":*" ]
64   sources = [
65     "base_session_service.cc",
66     "base_session_service.h",
67     "base_session_service_commands.cc",
68     "base_session_service_commands.h",
69     "base_session_service_delegate.h",
70     "core/serialized_navigation_driver.h",
71     "serialized_navigation_entry.cc",
72     "serialized_navigation_entry.h",
73     "session_backend.cc",
74     "session_backend.h",
75     "session_command.cc",
76     "session_command.h",
77     "session_id.cc",
78     "session_id.h",
79     "session_service_commands.cc",
80     "session_service_commands.h",
81     "session_types.cc",
82     "session_types.h",
83   ]
85   configs += [ ":implementation" ]
87   deps = [
88     "//base",
89     "//skia",
90     "//sync",
91     "//sync/protocol",
92     "//third_party/protobuf:protobuf_lite",
93     "//ui/base",
94     "//ui/gfx",
95     "//url",
96   ]
99 source_set("test_support") {
100   testonly = true
101   sources = [
102     "serialized_navigation_entry_test_helper.cc",
103     "serialized_navigation_entry_test_helper.h",
104   ]
106   public_deps = [
107     ":sessions",
108   ]
109   deps = [
110     "//skia",
111     "//sync",
112     "//testing/gtest",
113   ]
115   if (!is_android && !is_ios) {
116     sources += [
117       "base_session_service_test_helper.cc",
118       "base_session_service_test_helper.h",
119     ]
120   }
123 if (!is_ios && !is_android) {
124   source_set("unit_tests") {
125     testonly = true
126     sources = [
127       "session_backend_unittest.cc",
128       "session_types_unittest.cc",
129     ]
130     deps = [
131       ":sessions",
132       "//base/test:test_support",
133       "//testing/gtest",
134       "//third_party/protobuf:protobuf_lite",
135     ]
136   }