chromium/mojo/public/cpp/bindings/lib/sync_call_restrictions.cc

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

#include "mojo/public/cpp/bindings/sync_call_restrictions.h"

#include "base/check_op.h"
#include "base/debug/leak_annotations.h"
#include "base/logging.h"
#include "base/no_destructor.h"
#include "base/synchronization/lock.h"
#include "base/threading/sequence_local_storage_map.h"
#include "base/threading/sequence_local_storage_slot.h"
#include "mojo/public/c/system/core.h"

namespace mojo {

namespace {

// Sync call interrupts are enabled by default.
bool g_enable_sync_call_interrupts =;

#if ENABLE_SYNC_CALL_RESTRICTIONS

class GlobalSyncCallSettings {};

GlobalSyncCallSettings& GetGlobalSettings() {}

size_t& GetSequenceLocalScopedAllowCount() {}

// Sometimes sync calls need to be made while sequence-local storage is not
// initialized. In particular this can occur during thread tear-down while TLS
// objects (including SequenceLocalStorageMap itself) are being destroyed. We
// can't track a sequence-local policy in such cases, so we don't enforce one.
bool SyncCallRestrictionsEnforceable() {}

#endif  // ENABLE_SYNC_CALL_RESTRICTIONS

}  // namespace

#if ENABLE_SYNC_CALL_RESTRICTIONS

// static
void SyncCallRestrictions::AssertSyncCallAllowed() {}

// static
void SyncCallRestrictions::DisallowSyncCall() {}

// static
void SyncCallRestrictions::IncreaseScopedAllowCount() {}

// static
void SyncCallRestrictions::DecreaseScopedAllowCount() {}

#endif  // ENABLE_SYNC_CALL_RESTRICTIONS

// static
void SyncCallRestrictions::DisableSyncCallInterrupts() {}

// static
void SyncCallRestrictions::EnableSyncCallInterruptsForTesting() {}

// static
bool SyncCallRestrictions::AreSyncCallInterruptsEnabled() {}

}  // namespace mojo