| Index: chrome/browser/ui/webui/print_preview/print_preview_ui.cc
|
| diff --git a/chrome/browser/ui/webui/print_preview/print_preview_ui.cc b/chrome/browser/ui/webui/print_preview/print_preview_ui.cc
|
| index e1f286abcc707dc5649b500402f214e7e69a8b52..f26c8ba6630adf96ee8332dbc1b70078cd731a98 100644
|
| --- a/chrome/browser/ui/webui/print_preview/print_preview_ui.cc
|
| +++ b/chrome/browser/ui/webui/print_preview/print_preview_ui.cc
|
| @@ -7,6 +7,7 @@
|
| #include <map>
|
| #include <vector>
|
|
|
| +#include "base/command_line.h"
|
| #include "base/feature_list.h"
|
| #include "base/id_map.h"
|
| #include "base/lazy_instance.h"
|
| @@ -29,6 +30,7 @@
|
| #include "chrome/browser/ui/webui/print_preview/print_preview_handler.h"
|
| #include "chrome/browser/ui/webui/theme_source.h"
|
| #include "chrome/common/chrome_features.h"
|
| +#include "chrome/common/chrome_switches.h"
|
| #include "chrome/common/url_constants.h"
|
| #include "chrome/grit/browser_resources.h"
|
| #include "chrome/grit/chromium_strings.h"
|
| @@ -418,6 +420,16 @@ content::WebUIDataSource* CreatePrintPreviewUISource() {
|
| #else
|
| source->AddBoolean("showLocalManageButton", true);
|
| #endif
|
| +
|
| +// printBrowserEnabled is used to determine whether or not to show the navbar
|
| +#if BUILDFLAG(ENABLE_PRINT_BROWSER)
|
| + bool print_browser_enabled =
|
| + base::CommandLine::ForCurrentProcess()->HasSwitch(
|
| + ::switches::kEnablePrintBrowser);
|
| + source->AddBoolean("printBrowserEnabled", print_browser_enabled);
|
| +#else
|
| + source->AddBoolean("printBrowserEnabled", false);
|
| +#endif
|
| return source;
|
| }
|
|
|
|
|