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

#import "ios/components/security_interstitials/lookalikes/lookalike_url_tab_allow_list.h"

#import "ios/web/public/web_state.h"

LookalikeUrlTabAllowList::LookalikeUrlTabAllowList(web::WebState* web_state) {}

LookalikeUrlTabAllowList::LookalikeUrlTabAllowList(
    LookalikeUrlTabAllowList&& other) = default;

LookalikeUrlTabAllowList& LookalikeUrlTabAllowList::operator=(
    LookalikeUrlTabAllowList&& other) = default;

LookalikeUrlTabAllowList::~LookalikeUrlTabAllowList() = default;

bool LookalikeUrlTabAllowList::IsDomainAllowed(const std::string& domain) {
  return allowed_domains_.contains(domain);
}

void LookalikeUrlTabAllowList::AllowDomain(const std::string& domain) {
  allowed_domains_.insert(domain);
}
