| Index: components/precache/core/precache_manifest_util.h
|
| diff --git a/components/precache/core/precache_manifest_util.h b/components/precache/core/precache_manifest_util.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..b3e2ec2f55bc9bf15bbdc3fe2cf303a13307cfcd
|
| --- /dev/null
|
| +++ b/components/precache/core/precache_manifest_util.h
|
| @@ -0,0 +1,30 @@
|
| +// Copyright 2017 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 COMPONENTS_PRECACHE_CORE_PRECACHE_MANIFEST_UTIL_H_
|
| +#define COMPONENTS_PRECACHE_CORE_PRECACHE_MANIFEST_UTIL_H_
|
| +
|
| +#include <stdint.h>
|
| +
|
| +#include <vector>
|
| +
|
| +#include "base/optional.h"
|
| +
|
| +namespace precache {
|
| +
|
| +class PrecacheManifest;
|
| +
|
| +// Removes unknown fields from the |manifest| including embedded messages.
|
| +void RemoveUnknownFields(PrecacheManifest* manifest);
|
| +
|
| +// Returns the resource selection bitset from the |manifest| for the given
|
| +// |experiment_id|. If the experiment group is not found, then this returns
|
| +// nullopt, in which case all resources should be selected.
|
| +base::Optional<std::vector<bool>> GetResourceBitset(
|
| + const PrecacheManifest& manifest,
|
| + uint32_t experiment_id);
|
| +
|
| +} // namespace precache
|
| +
|
| +#endif // COMPONENTS_PRECACHE_CORE_PRECACHE_MANIFEST_UTIL_H_
|
|
|