diff --git a/chromium_src/chrome/common/chrome_content_client.h b/chromium_src/chrome/common/chrome_content_client.h new file mode 100644 index 000000000000..91cd91eac585 --- /dev/null +++ b/chromium_src/chrome/common/chrome_content_client.h @@ -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_CHROME_COMMON_CHROME_CONTENT_CLIENT_H_ +#define BRAVE_CHROMIUM_SRC_CHROME_COMMON_CHROME_CONTENT_CLIENT_H_ + +#define kPDFExtensionPluginName \ + kPDFExtensionPluginName_Unused[]; \ + static const char kPDFExtensionPluginName + +#define kPDFInternalPluginName \ + kPDFInternalPluginName_Unused[]; \ + static const char kPDFInternalPluginName + +#include "../../../../chrome/common/chrome_content_client.h" + +#undef kPDFExtensionPluginName +#undef kPDFInternalPluginName + +#endif // BRAVE_CHROMIUM_SRC_CHROME_COMMON_CHROME_CONTENT_CLIENT_H_ diff --git a/chromium_src/chrome/common/chrome_content_client_constants.cc b/chromium_src/chrome/common/chrome_content_client_constants.cc new file mode 100644 index 000000000000..09a325d893d0 --- /dev/null +++ b/chromium_src/chrome/common/chrome_content_client_constants.cc @@ -0,0 +1,17 @@ +/* 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 "chrome/common/chrome_content_client.h" + +#define kPDFExtensionPluginName kPDFExtensionPluginName_Unused +#define kPDFInternalPluginName kPDFInternalPluginName_Unused + +#include "../../../../chrome/common/chrome_content_client_constants.cc" + +#undef kPDFExtensionPluginName +#undef kPDFInternalPluginName + +const char ChromeContentClient::kPDFExtensionPluginName[] = "Chrome PDF Viewer"; +const char ChromeContentClient::kPDFInternalPluginName[] = "Chrome PDF Plugin"; diff --git a/patches/chrome-common-chrome_content_client_constants.cc.patch b/patches/chrome-common-chrome_content_client_constants.cc.patch deleted file mode 100644 index 8878b74b879e..000000000000 --- a/patches/chrome-common-chrome_content_client_constants.cc.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/chrome/common/chrome_content_client_constants.cc b/chrome/common/chrome_content_client_constants.cc -index a8365688d3ea165e26bc6a9e1b1851cbacaf59b2..659229e8b0774574393d4212af9a42a98ed657f2 100644 ---- a/chrome/common/chrome_content_client_constants.cc -+++ b/chrome/common/chrome_content_client_constants.cc -@@ -14,7 +14,7 @@ const base::FilePath::CharType ChromeContentClient::kNaClPluginFileName[] = - FILE_PATH_LITERAL("internal-nacl-plugin"); - #endif - --#if defined(GOOGLE_CHROME_BUILD) -+#if 1 // Always enabled for Brave's Chromium build - const char ChromeContentClient::kPDFExtensionPluginName[] = "Chrome PDF Viewer"; - const char ChromeContentClient::kPDFInternalPluginName[] = "Chrome PDF Plugin"; - #else