// Copyright 2013 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef COMPONENTS_POLICY_CORE_COMMON_CLOUD_EXTERNAL_POLICY_DATA_UPDATER_H_ #define COMPONENTS_POLICY_CORE_COMMON_CLOUD_EXTERNAL_POLICY_DATA_UPDATER_H_ #include <stddef.h> #include <stdint.h> #include <map> #include <memory> #include <string> #include "base/containers/queue.h" #include "base/functional/callback_forward.h" #include "base/memory/ref_counted.h" #include "base/memory/weak_ptr.h" #include "components/policy/policy_export.h" namespace base { class SequencedTaskRunner; } namespace policy { class ExternalPolicyDataFetcher; // This class downloads external policy data. Given a |Request|, data is fetched // from the |url|, verified to not exceed |max_size| and to match the expected // |hash| and then handed to a callback that can do further verification before // finally deciding whether the fetched data is valid. // If a fetch is not successful or retrieves invalid data, retries are scheduled // with exponential backoff. // The actual fetching is handled by an ExternalPolicyDataFetcher, allowing this // class to run on a background thread where network I/O is not possible. class POLICY_EXPORT ExternalPolicyDataUpdater { … }; } // namespace policy #endif // COMPONENTS_POLICY_CORE_COMMON_CLOUD_EXTERNAL_POLICY_DATA_UPDATER_H_