#include "components/invalidation/impl/invalidator_registrar_with_memory.h"
#include <cstddef>
#include <optional>
#include <string>
#include <utility>
#include <vector>
#include "base/feature_list.h"
#include "base/logging.h"
#include "base/notreached.h"
#include "base/observer_list.h"
#include "base/stl_util.h"
#include "base/strings/string_util.h"
#include "base/values.h"
#include "components/invalidation/public/invalidation.h"
#include "components/invalidation/public/invalidation_util.h"
#include "components/invalidation/public/invalidator_state.h"
#include "components/prefs/pref_registry_simple.h"
#include "components/prefs/scoped_user_pref_update.h"
namespace invalidation {
namespace {
constexpr char kTopicsToHandler[] = …;
constexpr char kDeprecatedSyncInvalidationGCMSenderId[] = …;
constexpr char kHandler[] = …;
constexpr char kIsPublic[] = …;
std::string DumpRegisteredHandlers(
const base::ObserverList<InvalidationHandler, true>& handlers) { … }
std::string DumpRegisteredHandlersToTopics(
const std::map<InvalidationHandler*, TopicMap, std::less<>>&
registered_handler_to_topics_map) { … }
}
BASE_FEATURE(…);
void InvalidatorRegistrarWithMemory::RegisterProfilePrefs(
PrefRegistrySimple* registry) { … }
void InvalidatorRegistrarWithMemory::RegisterPrefs(
PrefRegistrySimple* registry) { … }
void InvalidatorRegistrarWithMemory::ClearDeprecatedPrefs(PrefService* prefs) { … }
InvalidatorRegistrarWithMemory::InvalidatorRegistrarWithMemory(
PrefService* prefs,
const std::string& sender_id)
: … { … }
InvalidatorRegistrarWithMemory::~InvalidatorRegistrarWithMemory() { … }
void InvalidatorRegistrarWithMemory::AddObserver(InvalidationHandler* handler) { … }
bool InvalidatorRegistrarWithMemory::HasObserver(
const InvalidationHandler* handler) const { … }
void InvalidatorRegistrarWithMemory::RemoveObserver(
const InvalidationHandler* handler) { … }
bool InvalidatorRegistrarWithMemory::UpdateRegisteredTopics(
InvalidationHandler* handler,
const TopicMap& topics) { … }
TopicMap InvalidatorRegistrarWithMemory::GetRegisteredTopics(
InvalidationHandler* handler) const { … }
TopicMap InvalidatorRegistrarWithMemory::GetAllSubscribedTopics() const { … }
std::optional<Invalidation>
InvalidatorRegistrarWithMemory::DispatchInvalidationToHandlers(
const Invalidation& invalidation) { … }
void InvalidatorRegistrarWithMemory::DispatchSuccessfullySubscribedToHandlers(
const Topic& topic) { … }
void InvalidatorRegistrarWithMemory::UpdateInvalidatorState(
InvalidatorState state) { … }
InvalidatorState InvalidatorRegistrarWithMemory::GetInvalidatorState() const { … }
bool InvalidatorRegistrarWithMemory::HasDuplicateTopicRegistration(
InvalidationHandler* handler,
const TopicMap& new_topics) const { … }
}