Modernising all namespaces in brave to use nested concat namespace declarations. This change is part of a large effort to modernise the brave codebase across the board with `clang-tidy`, in order to allow future use of `clang-duty`during code reviews. The idea is to apply a few modernisers across the codebase in order to have less noise when trying to use clang-tidy with some sort of autmoation.
27 lines
780 B
C++
27 lines
780 B
C++
/* 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 <memory>
|
|
#include <string>
|
|
|
|
#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
|