| OLD | NEW |
| (Empty) | |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef COMPONENTS_PRECACHE_CORE_PRECACHE_MANIFEST_UTIL_H_ |
| 6 #define COMPONENTS_PRECACHE_CORE_PRECACHE_MANIFEST_UTIL_H_ |
| 7 |
| 8 #include <stdint.h> |
| 9 |
| 10 #include <vector> |
| 11 |
| 12 #include "base/optional.h" |
| 13 |
| 14 namespace precache { |
| 15 |
| 16 class PrecacheManifest; |
| 17 |
| 18 // Removes unknown fields from the |manifest| including embedded messages. |
| 19 void RemoveUnknownFields(PrecacheManifest* manifest); |
| 20 |
| 21 // Returns the resource selection bitset from the |manifest| for the given |
| 22 // |experiment_id|. If the experiment group is not found, then this returns |
| 23 // nullopt, in which case all resources should be selected. |
| 24 base::Optional<std::vector<bool>> GetResourceBitset( |
| 25 const PrecacheManifest& manifest, |
| 26 uint32_t experiment_id); |
| 27 |
| 28 } // namespace precache |
| 29 |
| 30 #endif // COMPONENTS_PRECACHE_CORE_PRECACHE_MANIFEST_UTIL_H_ |
| OLD | NEW |