#include "components/policy/content/safe_search_service.h"
#include <utility>
#include "base/functional/bind.h"
#include "components/keyed_service/content/browser_context_dependency_manager.h"
#include "components/safe_search_api/safe_search/safe_search_url_checker_client.h"
#include "components/safe_search_api/url_checker.h"
#include "components/url_matcher/url_util.h"
#include "content/public/browser/browser_context.h"
#include "content/public/browser/storage_partition.h"
#include "net/base/net_errors.h"
namespace {
void OnCheckURLDone(SafeSearchService::CheckSafeSearchCallback callback,
const GURL& ,
safe_search_api::Classification classification,
bool ) { … }
}
SafeSearchService::SafeSearchService(content::BrowserContext* browser_context)
: … { … }
SafeSearchService::~SafeSearchService() = default;
bool SafeSearchService::CheckSafeSearchURL(const GURL& url,
CheckSafeSearchCallback callback) { … }
void SafeSearchService::SetSafeSearchURLCheckerForTest(
std::unique_ptr<safe_search_api::URLChecker> safe_search_url_checker) { … }
SafeSearchFactory* SafeSearchFactory::GetInstance() { … }
SafeSearchService* SafeSearchFactory::GetForBrowserContext(
content::BrowserContext* context) { … }
SafeSearchFactory::SafeSearchFactory()
: … { … }
SafeSearchFactory::~SafeSearchFactory() = default;
std::unique_ptr<KeyedService>
SafeSearchFactory::BuildServiceInstanceForBrowserContext(
content::BrowserContext* context) const { … }
content::BrowserContext* SafeSearchFactory::GetBrowserContextToUse(
content::BrowserContext* context) const { … }