chromium/chrome/common/importer/BUILD.gn

# Copyright 2016 The Chromium Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

import("//mojo/public/tools/bindings/mojom.gni")

assert(!is_fuchsia, "Fuchsia shouldn't use anything in //chrome")

mojom("interfaces") {
  sources = [ "profile_import.mojom" ]

  public_deps = [
    "//mojo/public/mojom/base",
    "//sandbox/policy/mojom",
    "//url/mojom:url_mojom_gurl",
  ]

  cpp_typemaps = [
    {
      types = [
        {
          mojom = "chrome.mojom.FaviconUsageDataList"
          cpp = "::favicon_base::FaviconUsageDataList"
        },
        {
          mojom = "chrome.mojom.ImportedBookmarkEntry"
          cpp = "::ImportedBookmarkEntry"
        },
        {
          mojom = "chrome.mojom.ImporterAutofillFormDataEntry"
          cpp = "::ImporterAutofillFormDataEntry"
        },
        {
          mojom = "chrome.mojom.ImporterIE7PasswordInfo"
          cpp = "::importer::ImporterIE7PasswordInfo"
        },
        {
          mojom = "chrome.mojom.ImporterURLRow"
          cpp = "::ImporterURLRow"
        },
        {
          mojom = "chrome.mojom.SearchEngineInfo"
          cpp = "::importer::SearchEngineInfo"
        },
        {
          mojom = "chrome.mojom.SourceProfile"
          cpp = "::importer::SourceProfile"
        },
        {
          mojom = "chrome.mojom.ImportItem"
          cpp = "::importer::ImportItem"
        },
        {
          mojom = "chrome.mojom.ImportedPasswordForm"
          cpp = "::importer::ImportedPasswordForm"
        },
      ]
      traits_headers = [
        "//chrome/common/importer/imported_bookmark_entry.h",
        "//chrome/common/importer/importer_autofill_form_data_entry.h",
        "//chrome/common/importer/importer_data_types.h",
        "//chrome/common/importer/importer_url_row.h",
        "//components/favicon_base/favicon_usage_data.h",
      ]
      traits_private_headers = [
        "profile_import_process_param_traits.h",
        "profile_import_process_param_traits_macros.h",
      ]
      traits_sources = [ "profile_import_process_param_traits.cc" ]
      traits_public_deps = [
        "//chrome/common",
        "//components/autofill/core/common",
        "//components/favicon_base",
        "//ipc",
      ]
    },
  ]
}

source_set("importer") {
  sources = [
    "firefox_importer_utils.cc",
    "firefox_importer_utils.h",
    "imported_bookmark_entry.cc",
    "imported_bookmark_entry.h",
    "importer_autofill_form_data_entry.cc",
    "importer_autofill_form_data_entry.h",
    "importer_bridge.cc",
    "importer_bridge.h",
    "importer_data_types.cc",
    "importer_data_types.h",
    "importer_type.h",
    "importer_url_row.cc",
    "importer_url_row.h",
    "pstore_declarations.h",
  ]
  if (is_chromeos || is_linux) {
    sources += [ "firefox_importer_utils_linux.cc" ]
  } else if (is_mac) {
    sources += [
      "firefox_importer_utils_mac.mm",
      "safari_importer_utils.h",
      "safari_importer_utils.mm",
    ]
  } else if (is_win) {
    sources += [
      "edge_importer_utils_win.cc",
      "edge_importer_utils_win.h",
      "firefox_importer_utils_win.cc",
      "ie_importer_utils_win.cc",
      "ie_importer_utils_win.h",
      "importer_test_registry_overrider_win.cc",
      "importer_test_registry_overrider_win.h",
    ]
  }
  deps = [
    "//base",
    "//chrome/app:generated_resources",
    "//chrome/common:ini_parser",
    "//components/favicon_base",
    "//content/public/common",
    "//ui/base",
    "//url",
  ]
}