Skip to content

Commit

Permalink
Merge pull request #5788 from brave/maxk-fix-extensions-prompt-1.11.x
Browse files Browse the repository at this point in the history
Fixes extensions install prompt (1.11.x).
  • Loading branch information
LaurenWags authored Jun 10, 2020
2 parents 8e23a06 + 812cf92 commit 958e4ed
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 76 deletions.
2 changes: 0 additions & 2 deletions browser/extensions/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@ source_set("extensions") {
"brave_component_extension_resource_manager.h",
"brave_component_loader.cc",
"brave_component_loader.h",
"brave_extension_install_prompt.cc",
"brave_extension_install_prompt.h",
"brave_extension_management.cc",
"brave_extension_management.h",
"brave_extension_provider.cc",
Expand Down
21 changes: 0 additions & 21 deletions browser/extensions/brave_extension_install_prompt.h

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,25 @@
* 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/brave_extension_install_prompt.h"
#include "chrome/browser/extensions/extension_install_prompt.h"

#include "brave/browser/brave_browser_process_impl.h"
#include "brave/components/brave_component_updater/browser/extension_whitelist_service.h"
#include "brave/grit/brave_generated_resources.h"
#include "ui/base/l10n/l10n_util.h"

base::string16 BravePrompt::GetDialogTitle() const {
#define GetDialogTitle GetDialogTitle_ChromiumImpl
#include "../../../../../chrome/browser/extensions/extension_install_prompt.cc"
#undef GetDialogTitle

base::string16 ExtensionInstallPrompt::Prompt::GetDialogTitle() const {
if (!g_brave_browser_process->extension_whitelist_service()->IsVetted(
extension())) {
extension())) {
if (type_ == ExtensionInstallPrompt::INSTALL_PROMPT ||
type_ == ExtensionInstallPrompt::WEBSTORE_WIDGET_PROMPT) {
return l10n_util::GetStringUTF16(
IDS_UNVETTED_EXTENSION_INSTALL_PROMPT_TITLE);
}
}
return ExtensionInstallPrompt::Prompt::GetDialogTitle();
return GetDialogTitle_ChromiumImpl();
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,11 @@
#ifndef BRAVE_CHROMIUM_SRC_CHROME_BROWSER_EXTENSIONS_EXTENSION_INSTALL_PROMPT_H_
#define BRAVE_CHROMIUM_SRC_CHROME_BROWSER_EXTENSIONS_EXTENSION_INSTALL_PROMPT_H_

#define GetDialogTitle virtual GetDialogTitle
#define GetDialogTitle \
GetDialogTitle_ChromiumImpl() const; \
base::string16 GetDialogTitle

#define BRAVE_EXTENSION_INSTALL_PROMPT_H \
private: \
friend class BravePrompt; \
\
public:
#include "../../../../../chrome/browser/extensions/extension_install_prompt.h"
#undef BRAVE_EXTENSION_INSTALL_PROMPT_H_
#undef GetDialogTitle

#endif // BRAVE_CHROMIUM_SRC_CHROME_BROWSER_EXTENSIONS_EXTENSION_INSTALL_PROMPT_H_
Expand Down

This file was deleted.

21 changes: 0 additions & 21 deletions patches/chrome-browser-extensions-extension_install_prompt.h.patch

This file was deleted.

0 comments on commit 958e4ed

Please sign in to comment.