chromium/components/sync_device_info/device_info_prefs.cc

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

#include "components/sync_device_info/device_info_prefs.h"

#include <algorithm>
#include <utility>

#include "base/time/clock.h"
#include "base/time/default_clock.h"
#include "base/trace_event/trace_event.h"
#include "components/prefs/pref_registry_simple.h"
#include "components/prefs/pref_service.h"
#include "components/prefs/scoped_user_pref_update.h"

namespace syncer {
namespace {

// Preference name for storing recently used cache GUIDs and their timestamps
// in days since Windows epoch. Most recent first.
const char kDeviceInfoRecentGUIDsWithTimestamps[] =;

// Keys used in the dictionaries stored in prefs.
const char kCacheGuidKey[] =;
const char kTimestampKey[] =;

// The max time a local device's cached GUIDs will be stored.
constexpr base::TimeDelta kMaxTimeDeltaLocalCacheGuidsStored =;

// The max number of local device most recent cached GUIDs that will be stored
// in preferences.
constexpr int kMaxLocalCacheGuidsStored =;

// Returns true iff |dict| is a dictionary with a cache GUID that is equal to
// |cache_guid|.
bool MatchesGuidInDictionary(const base::Value& dict,
                             const std::string& cache_guid) {}

}  // namespace

// static
void DeviceInfoPrefs::RegisterProfilePrefs(PrefRegistrySimple* registry) {}

DeviceInfoPrefs::DeviceInfoPrefs(PrefService* pref_service,
                                 const base::Clock* clock)
    :{}

DeviceInfoPrefs::~DeviceInfoPrefs() = default;

bool DeviceInfoPrefs::IsRecentLocalCacheGuid(
    const std::string& cache_guid) const {}

void DeviceInfoPrefs::AddLocalCacheGuid(const std::string& cache_guid) {}

void DeviceInfoPrefs::GarbageCollectExpiredCacheGuids() {}

}  // namespace syncer