chromium/components/sync/service/local_data_description.h

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

#ifndef COMPONENTS_SYNC_SERVICE_LOCAL_DATA_DESCRIPTION_H_
#define COMPONENTS_SYNC_SERVICE_LOCAL_DATA_DESCRIPTION_H_

#include <string>
#include <vector>

#include "components/sync/base/data_type.h"

#if BUILDFLAG(IS_ANDROID)
#include "base/android/scoped_java_ref.h"
#endif

class GURL;

namespace syncer {

struct LocalDataDescription {};

// Returns a string that summarizes the domain content of `description`, meant
// to be consumed by the UI. Must not be called if the `description.domains` is
// empty.
std::u16string GetDomainsDisplayText(const LocalDataDescription& description);

// gmock printer helper.
void PrintTo(const LocalDataDescription& local_data_description,
             std::ostream* os);

#if BUILDFLAG(IS_ANDROID)
// Constructs a Java LocalDataDescription from the provided C++
// LocalDataDescription
base::android::ScopedJavaLocalRef<jobject> ConvertToJavaLocalDataDescription(
    JNIEnv* env,
    const syncer::LocalDataDescription& local_data_description);
#endif

}  // namespace syncer

#endif  // COMPONENTS_SYNC_SERVICE_LOCAL_DATA_DESCRIPTION_H_