<def-group>
  <definition class="compliance" id="chromium_trusted_home_page"  version="1">
    <metadata>
      <title>Set Trusted Homepage URL</title>
      <affected family="unix">
        <platform>Google Chromium Browser</platform>
      </affected>
      <description>The homepage must be set to a trusted site.</description>
    </metadata>
    <criteria>
      <criterion comment="Chromium set trusted homepage URL" test_ref="test_chromium_trusted_home_page" />
    </criteria>
  </definition>

  <ind:textfilecontent54_test check="all" comment="Chromium set trusted homepage URL" id="test_chromium_trusted_home_page" version="1">
    <ind:object object_ref="object_chromium_trusted_home_page" />
    <ind:state state_ref="state_chromium_trusted_home_page" />
  </ind:textfilecontent54_test>
  <ind:textfilecontent54_object id="object_chromium_trusted_home_page" version="1">
    <ind:filepath operation="pattern match">/etc/chromium/policies/managed/.*\.json</ind:filepath>
    <ind:pattern operation="pattern match">^[\s]+\"HomepageLocation\"\:[\s]+\"(\S+)\",</ind:pattern>
    <ind:instance datatype="int">1</ind:instance>
  </ind:textfilecontent54_object>

  <ind:textfilecontent54_state id="state_chromium_trusted_home_page" version="1">
    <ind:subexpression operation="equals" var_check="all" var_ref="var_trusted_home_page" />
  </ind:textfilecontent54_state>

  <external_variable id="var_trusted_home_page" datatype="string" version="1" comment="Expected home page" />

</def-group>
