Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove extensions-common-manifest_url_handlers.cc.patch #8065

Merged
merged 1 commit into from
Feb 25, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions chromium_src/extensions/common/manifest_url_handlers.cc
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
/* 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/. */

#include "extensions/common/manifest_url_handlers.h"

#define GetHomepageURL GetHomepageURL_Unused
#define GetWebStoreURL GetWebStoreURL_Unused

#include "../../../../extensions/common/manifest_url_handlers.cc"

#undef GetHomepageURL
#undef GetWebStoreURL

namespace extensions {

// We need to provide our own version of GetHomepageURL() as well to make sure
// that we get our own version of GetWebStoreURL() called when invoked via
// GetHomepageURL(). Otherwise the old version will still be called since the
// renaming of GetWebStoreURL() above does also modify the call point.
const GURL ManifestURL::GetHomepageURL(const Extension* extension) {
const GURL& homepage_url = Get(extension, keys::kHomepageURL);
if (homepage_url.is_valid())
return homepage_url;
return GetWebStoreURL(extension);
}

// static
const GURL ManifestURL::GetWebStoreURL(const Extension* extension) {
return GURL::EmptyGURL();
}

} // namespace extensions
22 changes: 22 additions & 0 deletions chromium_src/extensions/common/manifest_url_handlers.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/* 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_CHROMIUM_SRC_EXTENSIONS_COMMON_MANIFEST_URL_HANDLERS_H_
#define BRAVE_CHROMIUM_SRC_EXTENSIONS_COMMON_MANIFEST_URL_HANDLERS_H_

#define GetHomepageURL \
GetHomepageURL_Unused(const Extension* extension); \
static const GURL GetHomepageURL

#define GetWebStoreURL \
GetWebStoreURL_Unused(const Extension* extension); \
static const GURL GetWebStoreURL

#include "../../../../extensions/common/manifest_url_handlers.h"

#undef GetHomepageURL
#undef GetWebStoreURL

#endif // BRAVE_CHROMIUM_SRC_EXTENSIONS_COMMON_MANIFEST_URL_HANDLERS_H_
12 changes: 0 additions & 12 deletions patches/extensions-common-manifest_url_handlers.cc.patch

This file was deleted.