chromium/chrome/common/importer/profile_import_process_param_traits_macros.h

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

// Singly or Multiply-included shared traits file depending on circumstances.
// This allows the use of IPC serialization macros in more than one IPC message
// file.
#ifndef CHROME_COMMON_IMPORTER_PROFILE_IMPORT_PROCESS_PARAM_TRAITS_MACROS_H_
#define CHROME_COMMON_IMPORTER_PROFILE_IMPORT_PROCESS_PARAM_TRAITS_MACROS_H_

#include "build/build_config.h"
#include "chrome/common/importer/imported_bookmark_entry.h"
#include "chrome/common/importer/importer_autofill_form_data_entry.h"
#include "chrome/common/importer/importer_data_types.h"
#include "chrome/common/importer/importer_url_row.h"
#include "components/favicon_base/favicon_usage_data.h"
#include "content/public/common/common_param_traits.h"
#include "ipc/ipc_message_macros.h"

#if BUILDFLAG(IS_WIN)
IPC_ENUM_TRAITS_MIN_MAX_VALUE(importer::ImporterType,
                              importer::TYPE_UNKNOWN,
                              importer::TYPE_EDGE)
#else
IPC_ENUM_TRAITS_MIN_MAX_VALUE(importer::ImporterType,
                              importer::TYPE_UNKNOWN,
                              importer::TYPE_BOOKMARKS_FILE)
#endif

IPC_ENUM_TRAITS_MIN_MAX_VALUE(importer::ImportItem,
                              importer::NONE,
                              importer::ALL)

IPC_STRUCT_TRAITS_BEGIN(importer::SourceProfile)
  IPC_STRUCT_TRAITS_MEMBER()
  IPC_STRUCT_TRAITS_MEMBER()
  IPC_STRUCT_TRAITS_MEMBER()
  IPC_STRUCT_TRAITS_MEMBER()
  IPC_STRUCT_TRAITS_MEMBER()
  IPC_STRUCT_TRAITS_MEMBER()
IPC_STRUCT_TRAITS_END()

IPC_STRUCT_TRAITS_BEGIN(ImporterURLRow)
  IPC_STRUCT_TRAITS_MEMBER()
  IPC_STRUCT_TRAITS_MEMBER()
  IPC_STRUCT_TRAITS_MEMBER()
  IPC_STRUCT_TRAITS_MEMBER()
  IPC_STRUCT_TRAITS_MEMBER()
  IPC_STRUCT_TRAITS_MEMBER()
IPC_STRUCT_TRAITS_END()

IPC_STRUCT_TRAITS_BEGIN(ImportedBookmarkEntry)
  IPC_STRUCT_TRAITS_MEMBER()
  IPC_STRUCT_TRAITS_MEMBER()
  IPC_STRUCT_TRAITS_MEMBER()
  IPC_STRUCT_TRAITS_MEMBER()
  IPC_STRUCT_TRAITS_MEMBER()
  IPC_STRUCT_TRAITS_MEMBER()
IPC_STRUCT_TRAITS_END()

IPC_STRUCT_TRAITS_BEGIN(favicon_base::FaviconUsageData)
  IPC_STRUCT_TRAITS_MEMBER()
  IPC_STRUCT_TRAITS_MEMBER()
  IPC_STRUCT_TRAITS_MEMBER()
IPC_STRUCT_TRAITS_END()

IPC_STRUCT_TRAITS_BEGIN(importer::SearchEngineInfo)
  IPC_STRUCT_TRAITS_MEMBER()
  IPC_STRUCT_TRAITS_MEMBER()
  IPC_STRUCT_TRAITS_MEMBER()
IPC_STRUCT_TRAITS_END()

IPC_STRUCT_TRAITS_BEGIN(ImporterAutofillFormDataEntry)
  IPC_STRUCT_TRAITS_MEMBER()
  IPC_STRUCT_TRAITS_MEMBER()
  IPC_STRUCT_TRAITS_MEMBER()
  IPC_STRUCT_TRAITS_MEMBER()
  IPC_STRUCT_TRAITS_MEMBER()
IPC_STRUCT_TRAITS_END()

IPC_STRUCT_TRAITS_BEGIN(importer::ImporterIE7PasswordInfo)
  IPC_STRUCT_TRAITS_MEMBER()
  IPC_STRUCT_TRAITS_MEMBER()
  IPC_STRUCT_TRAITS_MEMBER()
IPC_STRUCT_TRAITS_END()

#endif  // CHROME_COMMON_IMPORTER_PROFILE_IMPORT_PROCESS_PARAM_TRAITS_MACROS_H_