/* Copyright (c) 2020 The Brave Authors. All rights reserved. * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this file, * You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "brave/browser/extensions/api/brave_talk_api.h" #include #include #include "base/environment.h" #include "chrome/browser/profiles/profile.h" namespace extensions::api { ExtensionFunction::ResponseAction BraveTalkIsSupportedFunction::Run() { Profile* profile = Profile::FromBrowserContext(browser_context()); if (profile->IsTor()) { return RespondNow(Error("Not available in Tor profile")); } return RespondNow(WithArguments(true)); } } // namespace extensions::api