* Prevents extensions from accessing protected resources. Fixes https://github.com/brave/brave-browser/issues/42998 * Changed root object from std::string to GURL * FIXUP: review feedback * FIXUP: addresses most feedback; need to fix GN * FIXUP: latest * FIXUP: fixed reference issues causing crash :) * FIXUP: one last fix * FIXUP: presubmit fixes * FIXUP: more review feedback fixes * FIXUP: fixing vector copies
32 lines
1.0 KiB
C++
32 lines
1.0 KiB
C++
// Copyright (c) 2021 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/.
|
|
|
|
#ifndef BRAVE_COMMON_EXTENSIONS_BRAVE_EXTENSIONS_CLIENT_H_
|
|
#define BRAVE_COMMON_EXTENSIONS_BRAVE_EXTENSIONS_CLIENT_H_
|
|
|
|
#include <string>
|
|
|
|
#include "chrome/common/extensions/chrome_extensions_client.h"
|
|
|
|
namespace extensions {
|
|
|
|
class BraveExtensionsClient : public ChromeExtensionsClient {
|
|
public:
|
|
BraveExtensionsClient();
|
|
BraveExtensionsClient(const BraveExtensionsClient&) = delete;
|
|
BraveExtensionsClient& operator=(const BraveExtensionsClient&) = delete;
|
|
|
|
void InitializeWebStoreUrls(base::CommandLine* command_line) override;
|
|
bool IsScriptableURL(const GURL& url, std::string* error) const override;
|
|
const GURL& GetWebstoreUpdateURL() const override;
|
|
|
|
private:
|
|
GURL webstore_update_url_;
|
|
};
|
|
|
|
} // namespace extensions
|
|
|
|
#endif // BRAVE_COMMON_EXTENSIONS_BRAVE_EXTENSIONS_CLIENT_H_
|