summaryrefslogtreecommitdiffstats
path: root/chromeos/app_mode/kiosk_oem_manifest_parser.h
blob: 05b7e0a99cb30f0fa5ee4f31b2cfd98b4bbfcf73 (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
32
33
34
35
36
37
38
39
40
41
42
43
44
// Copyright (c) 2013 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.

#ifndef CHROMEOS_APP_MODE_KIOSK_OEM_MANIFEST_PARSER_H_
#define CHROMEOS_APP_MODE_KIOSK_OEM_MANIFEST_PARSER_H_

#include <string>

#include "base/files/file_path.h"
#include "chromeos/chromeos_export.h"

namespace chromeos {

// Parser for app kiosk OEM manifest files.
class CHROMEOS_EXPORT KioskOemManifestParser {
 public:
  // Kiosk OEM manifest.
  struct Manifest {
    Manifest();

    // True if OOBE flow should enforce enterprise enrollment.
    bool enterprise_managed;
    // True user can exit enterprise enrollment during OOBE.
    bool can_exit_enrollment;
    // Intended purpose of the device. Meant to be pass-through value for
    // enterprise enrollment.
    std::string device_requisition;
    // True if OOBE flow should be adapted for keyboard flow.
    bool keyboard_driven_oobe;
  };

  // Loads manifest from |kiosk_oem_file|. Returns true if manifest was
  // found and successfully parsed.
  static bool Load(const base::FilePath& kiosk_oem_file,
                   Manifest* manifest);

 private:
  DISALLOW_IMPLICIT_CONSTRUCTORS(KioskOemManifestParser);
};

}  // namespace chromeos

#endif  // CHROMEOS_APP_MODE_KIOSK_OEM_MANIFEST_PARSER_H_