From 8ed07a85c7accadabed2bb41c7f1a11decaa4fdc Mon Sep 17 00:00:00 2001 From: Anthony Tseng Date: Tue, 28 Feb 2017 22:28:39 -0800 Subject: [PATCH] Add missing utility printing handler back https://chromium.googlesource.com/chromium/src.git/+/65f951ca1dc8c6b3fc5b2dc32e44b4e28a3b86e2 fix https://github.com/brave/browser-laptop/issues/7326 Auditors: @bridiver, @bbondy, @bsclifton --- atom/app/atom_main_delegate.cc | 3 ++- atom/utility/atom_content_utility_client.cc | 9 +++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/atom/app/atom_main_delegate.cc b/atom/app/atom_main_delegate.cc index 3f7ef282ec..e8a3eb9dab 100644 --- a/atom/app/atom_main_delegate.cc +++ b/atom/app/atom_main_delegate.cc @@ -38,6 +38,7 @@ #include "content/public/common/content_switches.h" #include "extensions/common/constants.h" #include "extensions/features/features.h" +#include "printing/features/features.h" #include "ui/base/l10n/l10n_util.h" #include "ui/base/resource/resource_bundle.h" #include "ui/base/ui_base_switches.h" @@ -335,7 +336,7 @@ int AtomMainDelegate::RunProcess( const std::string& process_type, const content::MainFunctionParams& main_function_params) { static const MainFunction kMainFunctions[] = { - #if defined(ENABLE_PRINT_PREVIEW) && !defined(CHROME_MULTIPLE_DLL_CHILD) + #if BUILDFLAG(ENABLE_PRINT_PREVIEW) && !defined(CHROME_MULTIPLE_DLL_CHILD) { switches::kServiceProcess, ServiceProcessMain }, #endif diff --git a/atom/utility/atom_content_utility_client.cc b/atom/utility/atom_content_utility_client.cc index 82dc09511e..2201112c22 100644 --- a/atom/utility/atom_content_utility_client.cc +++ b/atom/utility/atom_content_utility_client.cc @@ -22,6 +22,7 @@ #include "mojo/public/cpp/bindings/strong_binding.h" #include "net/proxy/mojo_proxy_resolver_factory_impl.h" #include "net/proxy/proxy_resolver_v8.h" +#include "printing/features/features.h" #include "services/service_manager/public/cpp/interface_registry.h" #if BUILDFLAG(ENABLE_EXTENSIONS) @@ -29,8 +30,8 @@ #include "extensions/utility/utility_handler.h" #endif -#if defined(ENABLE_PRINT_PREVIEW) || \ - (defined(ENABLE_BASIC_PRINTING) && defined(OS_WIN)) +#if BUILDFLAG(ENABLE_PRINT_PREVIEW) || \ + (BUILDFLAG(ENABLE_BASIC_PRINTING) && defined(OS_WIN)) #include "chrome/utility/printing_handler.h" #endif @@ -78,8 +79,8 @@ AtomContentUtilityClient::AtomContentUtilityClient() : filter_messages_(false) { handlers_.push_back(new ProfileImportHandler()); -#if defined(ENABLE_PRINT_PREVIEW) || \ - (defined(ENABLE_BASIC_PRINTING) && defined(OS_WIN)) +#if BUILDFLAG(ENABLE_PRINT_PREVIEW) || \ + (BUILDFLAG(ENABLE_BASIC_PRINTING) && defined(OS_WIN)) handlers_.push_back(new printing::PrintingHandler()); #endif }