chromium/components/sync/service/sync_internals_util.h

// Copyright 2012 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_SYNC_INTERNALS_UTIL_H_
#define COMPONENTS_SYNC_SERVICE_SYNC_INTERNALS_UTIL_H_

#include <memory>
#include <string>

#include "base/types/strong_alias.h"
#include "base/values.h"
#include "components/signin/public/identity_manager/account_info.h"

namespace syncer {

class SyncService;

namespace sync_ui_util {

// These strings are used from logs to pull out specific data from sync; we
// don't want these to ever go out of sync between the logs and sync util.
inline constexpr char kIdentityTitle[] =;
inline constexpr char kDetailsKey[] =;

// Resource paths.
// Must match the resource file names.
inline constexpr char kAboutJS[] =;
inline constexpr char kChromeSyncJS[] =;
inline constexpr char kDataJS[] =;
inline constexpr char kEventsJS[] =;
inline constexpr char kSearchJS[] =;
inline constexpr char kSyncIndexJS[] =;
inline constexpr char kSyncLogJS[] =;
inline constexpr char kSyncNodeBrowserJS[] =;
inline constexpr char kSyncSearchJS[] =;
inline constexpr char kUserEventsJS[] =;
inline constexpr char kTrafficLogJS[] =;
inline constexpr char kInvalidationsJS[] =;

// Message handlers.
// Must match the constants used in the resource files.
inline constexpr char kGetAllNodes[] =;
inline constexpr char kRequestDataAndRegisterForUpdates[] =;
inline constexpr char kRequestIncludeSpecificsInitialState[] =;
inline constexpr char kRequestListOfTypes[] =;
inline constexpr char kRequestStart[] =;
inline constexpr char kSetIncludeSpecifics[] =;
inline constexpr char kTriggerRefresh[] =;
inline constexpr char kWriteUserEvent[] =;

// Other strings.
// WARNING: Must match the property names used in the resource files.
inline constexpr char kEntityCounts[] =;
inline constexpr char kEntities[] =;
inline constexpr char kNonTombstoneEntities[] =;
inline constexpr char kIncludeSpecifics[] =;
inline constexpr char kDataType[] =;
inline constexpr char kOnAboutInfoUpdated[] =;
inline constexpr char kOnEntityCountsUpdated[] =;
inline constexpr char kOnProtocolEvent[] =;
inline constexpr char kOnReceivedIncludeSpecificsInitialState[] =;
inline constexpr char kOnReceivedListOfTypes[] =;
inline constexpr char kTypes[] =;
inline constexpr char kOnInvalidationReceived[] =;

IncludeSensitiveData;
// This function returns a base::Value::Dict which contains all the information
// required to populate the 'About' tab of chrome://sync-internals.
// Note that |service| may be null.
// If |include_sensitive_data| is false, Personally Identifiable Information
// won't be included in the return value.
base::Value::Dict ConstructAboutInformation(
    IncludeSensitiveData include_sensitive_data,
    SyncService* service,
    const std::string& channel);

}  // namespace sync_ui_util

}  // namespace syncer

#endif  // COMPONENTS_SYNC_SERVICE_SYNC_INTERNALS_UTIL_H_