summaryrefslogtreecommitdiffstats
path: root/chromium/chrome/browser/ui/webui/print_preview/policy_settings.cc
blob: 11ab72453e85a8e6d1853fed8ca4e5627683d1c9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
// Copyright 2018 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "chrome/browser/ui/webui/print_preview/policy_settings.h"

#include "chrome/common/pref_names.h"
#include "components/pref_registry/pref_registry_syncable.h"

namespace printing {

// static
void PolicySettings::RegisterProfilePrefs(
    user_prefs::PrefRegistrySyncable* registry) {
  registry->RegisterBooleanPref(prefs::kPrintHeaderFooter, true);
#if defined(OS_CHROMEOS)
  registry->RegisterIntegerPref(prefs::kPrintingAllowedBackgroundGraphicsModes,
                                0);
  registry->RegisterIntegerPref(prefs::kPrintingAllowedColorModes, 0);
  registry->RegisterIntegerPref(prefs::kPrintingAllowedDuplexModes, 0);
  registry->RegisterIntegerPref(prefs::kPrintingAllowedPinModes, 0);
  registry->RegisterListPref(prefs::kPrintingAllowedPageSizes);
  registry->RegisterIntegerPref(prefs::kPrintingBackgroundGraphicsDefault, 0);
  registry->RegisterIntegerPref(prefs::kPrintingColorDefault, 0);
  registry->RegisterIntegerPref(prefs::kPrintingDuplexDefault, 0);
  registry->RegisterIntegerPref(prefs::kPrintingPinDefault, 0);
  registry->RegisterDictionaryPref(prefs::kPrintingSizeDefault);
#endif
}

}  // namespace printing