<def-group>
  <definition class="compliance" id="chromium_default_search_provider_name"  version="1">
    <metadata>
      <title>Set Default Search Provider Name</title>
      <affected family="unix">
        <platform>Google Chromium Browser</platform>
      </affected>
      <description>The default search providers name must be set.</description>
    </metadata>
    <criteria>
      <criterion comment="Chromium set default search provider" test_ref="test_chromium_search_provider_name" />
    </criteria>
  </definition>

  <ind:textfilecontent54_test check="all" comment="Chromium set default search provider" id="test_chromium_search_provider_name" version="1">
    <ind:object object_ref="object_chromium_search_provider_name" />
    <ind:state state_ref="state_chromium_search_provider_name" />
  </ind:textfilecontent54_test>
  <ind:textfilecontent54_object id="object_chromium_search_provider_name" version="1">
    <ind:filepath operation="pattern match">^/etc/chromium/policies/managed/.*\.json$</ind:filepath>
    <ind:pattern operation="pattern match">^[\s]+"DefaultSearchProviderName"\:[\s]+"(\S+)",$</ind:pattern>
    <ind:instance datatype="int">1</ind:instance>
  </ind:textfilecontent54_object>

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

  <external_variable id="var_default_search_provider_name" datatype="string" version="1" comment="Expected search provider name" />
</def-group>
