Exemple #1
0
void
FeatureState::UserDisable(const char* aMessage, const nsACString& aFailureId)
{
  AssertInitialized();
  SetUser(FeatureStatus::Disabled, aMessage);
  SetFailureId(aFailureId);
}
Exemple #2
0
void
FeatureState::DisableByDefault(FeatureStatus aStatus, const char* aMessage,
                               const nsACString& aFailureId)
{
  // User/runtime decisions should not have been made yet.
  MOZ_ASSERT(!mUser.IsInitialized());
  MOZ_ASSERT(!mEnvironment.IsInitialized());
  MOZ_ASSERT(!mRuntime.IsInitialized());

  mDefault.Set(aStatus, aMessage);
  SetFailureId(aFailureId);
}
Exemple #3
0
void
FeatureState::SetFailed(FeatureStatus aStatus, const char* aMessage,
                        const nsACString& aFailureId)
{
  AssertInitialized();

  // We should never bother setting a runtime status to "enabled," since it could
  // override an explicit user decision to disable it.
  MOZ_ASSERT(IsFeatureStatusFailure(aStatus));

  SetRuntime(aStatus, aMessage);
  SetFailureId(aFailureId);
}
void
FeatureState::DisableByDefault(FeatureStatus aStatus, const char* aMessage,
                               const nsACString& aFailureId)
{
  // User/runtime decisions should not have been made yet.
  MOZ_ASSERT(!mUser.IsInitialized());
  MOZ_ASSERT(!mEnvironment.IsInitialized());
  MOZ_ASSERT(!mRuntime.IsInitialized());

  // Make sure that when disabling we actually use a failure status.
  MOZ_ASSERT(IsFeatureStatusFailure(aStatus));

  mDefault.Set(aStatus, aMessage);
  SetFailureId(aFailureId);
}