summaryrefslogtreecommitdiff
path: root/chromium/components/bookmarks/browser/BUILD.gn
blob: 8f3883400cbead8efba2d2e95d113c5203518a74 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
# Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

import("//build/config/ui.gni")

static_library("browser") {
  sources = [
    "base_bookmark_model_observer.cc",
    "base_bookmark_model_observer.h",
    "bookmark_client.cc",
    "bookmark_client.h",
    "bookmark_codec.cc",
    "bookmark_codec.h",
    "bookmark_expanded_state_tracker.cc",
    "bookmark_expanded_state_tracker.h",
    "bookmark_model.cc",
    "bookmark_model.h",
    "bookmark_model_observer.h",
    "bookmark_node.cc",
    "bookmark_node.h",
    "bookmark_node_data.cc",
    "bookmark_node_data.h",
    "bookmark_node_data_ios.cc",
    "bookmark_node_data_mac.cc",
    "bookmark_pasteboard_helper_mac.h",
    "bookmark_pasteboard_helper_mac.mm",
    "bookmark_storage.cc",
    "bookmark_storage.h",
    "bookmark_undo_delegate.h",
    "bookmark_undo_provider.h",
    "bookmark_utils.cc",
    "bookmark_utils.h",
    "scoped_group_bookmark_actions.cc",
    "scoped_group_bookmark_actions.h",
    "startup_task_runner_service.cc",
    "startup_task_runner_service.h",
    "titled_url_index.cc",
    "titled_url_index.h",
    "titled_url_match.cc",
    "titled_url_match.h",
    "titled_url_node.h",
    "titled_url_node_sorter.h",
    "typed_count_sorter.cc",
    "typed_count_sorter.h",
  ]

  public_deps = [
    "//components/bookmarks/common",
  ]

  deps = [
    "//base",
    "//base:i18n",
    "//components/favicon_base",
    "//components/keyed_service/core",
    "//components/pref_registry",
    "//components/prefs",
    "//components/query_parser",
    "//components/strings",
    "//components/url_formatter",
    "//net",
    "//third_party/icu",
    "//ui/base",
    "//ui/gfx",
    "//url",
  ]

  if (toolkit_views) {
    sources += [ "bookmark_node_data_views.cc" ]
    deps += [ "//ui/views" ]
  }

  if (is_mac) {
    libs = [
      "AppKit.framework",
      "Foundation.framework",
    ]
  }
}

bundle_data("unit_tests_bundle_data") {
  visibility = [ ":unit_tests" ]
  testonly = true
  sources = [
    "//components/test/data/bookmarks/meta_info_as_string.json",
    "//components/test/data/bookmarks/model_without_sync.json",
  ]
  outputs = [
    "{{bundle_resources_dir}}/" +
        "{{source_root_relative_dir}}/{{source_file_part}}",
  ]
}

source_set("unit_tests") {
  testonly = true
  sources = [
    "bookmark_codec_unittest.cc",
    "bookmark_expanded_state_tracker_unittest.cc",
    "bookmark_index_unittest.cc",
    "bookmark_model_unittest.cc",
    "bookmark_utils_unittest.cc",
    "titled_url_match_unittest.cc",
  ]

  if (toolkit_views) {
    sources += [ "bookmark_node_data_unittest.cc" ]
  }

  configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]

  deps = [
    ":browser",
    ":unit_tests_bundle_data",
    "//base/test:test_support",
    "//components/bookmarks/common",
    "//components/bookmarks/test",
    "//components/favicon_base",
    "//components/pref_registry",
    "//components/prefs",
    "//components/prefs:test_support",
    "//testing/gtest",
    "//ui/base",
    "//url",
  ]
}