blob: 586e4b3e4f79a57c3ce5b4f7b7965f03e2bcca3b [file] [log] [blame]
// Copyright 2019 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.
class GURL;
namespace optimization_guide {
namespace proto {
class Hint;
class Optimization;
class PageHint;
} // namespace proto
} // namespace optimization_guide
namespace previews {
// Returns whether |optimization| is disabled subject to it being part of
// an optimization hint experiment. |optimization| could be disabled either
// because: it is only to be used with a named optimization experiment; or it
// is not to be used with a named excluded experiment. One experiment name
// may be configured for the client with the experiment_name parameter to the
// kOptimizationHintsExperiments feature.
bool IsDisabledPerOptimizationHintExperiment(
const optimization_guide::proto::Optimization& optimization);
// Returns the matching PageHint for |gurl| if found in |hint|.
const optimization_guide::proto::PageHint* FindPageHintForURL(
const GURL& gurl,
const optimization_guide::proto::Hint* hint);
} // namespace previews